chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import: support downloading bzip2-encoded images
[elogind.git]
/
src
/
import
/
import.c
diff --git
a/src/import/import.c
b/src/import/import.c
index d9cff3e239be2aa2fd3330785b9aab8148bdd36b..b3ebb353570fa09608878ff84e5859171c290037 100644
(file)
--- a/
src/import/import.c
+++ b/
src/import/import.c
@@
-51,10
+51,12
@@
static int strip_tar_suffixes(const char *name, char **ret) {
char *s;
e = endswith(name, ".tar");
char *s;
e = endswith(name, ".tar");
+ if (!e)
+ e = endswith(name, ".tar.xz");
if (!e)
e = endswith(name, ".tar.gz");
if (!e)
if (!e)
e = endswith(name, ".tar.gz");
if (!e)
- e = endswith(name, ".tar.
xz
");
+ e = endswith(name, ".tar.
bz2
");
if (!e)
e = endswith(name, ".tgz");
if (!e)
if (!e)
e = endswith(name, ".tgz");
if (!e)
@@
-135,7
+137,7
@@
static int pull_tar(int argc, char *argv[], void *userdata) {
if (r < 0)
return log_error_errno(r, "Failed to allocate importer: %m");
if (r < 0)
return log_error_errno(r, "Failed to allocate importer: %m");
- r = tar_import_pull(import, url, local, arg_force);
+ r = tar_import_pull(import, url, local, arg_force
, arg_verify
);
if (r < 0)
return log_error_errno(r, "Failed to pull image: %m");
if (r < 0)
return log_error_errno(r, "Failed to pull image: %m");
@@
-162,6
+164,7
@@
static int strip_raw_suffixes(const char *p, char **ret) {
static const char suffixes[] =
".xz\0"
".gz\0"
static const char suffixes[] =
".xz\0"
".gz\0"
+ ".bz2\0"
".raw\0"
".qcow2\0"
".img\0"
".raw\0"
".qcow2\0"
".img\0"