summaryrefslogtreecommitdiff
path: root/src/import
diff options
context:
space:
mode:
Diffstat (limited to 'src/import')
-rw-r--r--src/import/curl-util.c1
-rw-r--r--src/import/export-raw.c2
-rw-r--r--src/import/export-tar.c2
-rw-r--r--src/import/export.c2
-rw-r--r--src/import/import-common.c2
-rw-r--r--src/import/import-compress.c3
-rw-r--r--src/import/import-raw.c4
-rw-r--r--src/import/import-tar.c3
-rw-r--r--src/import/import.c2
-rw-r--r--src/import/importd.c6
-rw-r--r--src/import/pull-common.c6
-rw-r--r--src/import/pull-dkr.c12
-rw-r--r--src/import/pull-job.c4
-rw-r--r--src/import/pull-raw.c5
-rw-r--r--src/import/pull-tar.c4
-rw-r--r--src/import/pull.c3
-rw-r--r--src/import/qcow2-util.c7
17 files changed, 58 insertions, 10 deletions
diff --git a/src/import/curl-util.c b/src/import/curl-util.c
index 455fa1e07d..4278466df1 100644
--- a/src/import/curl-util.c
+++ b/src/import/curl-util.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "curl-util.h"
#include "fd-util.h"
#include "string-util.h"
diff --git a/src/import/export-raw.c b/src/import/export-raw.c
index 24c0ec9309..103d45bf21 100644
--- a/src/import/export-raw.c
+++ b/src/import/export-raw.c
@@ -25,10 +25,12 @@
#include "sd-daemon.h"
+#include "alloc-util.h"
#include "btrfs-util.h"
#include "copy.h"
#include "export-raw.h"
#include "fd-util.h"
+#include "fileio.h"
#include "import-common.h"
#include "ratelimit.h"
#include "string-util.h"
diff --git a/src/import/export-tar.c b/src/import/export-tar.c
index aa9b7f1a91..2bbec661e6 100644
--- a/src/import/export-tar.c
+++ b/src/import/export-tar.c
@@ -21,9 +21,11 @@
#include "sd-daemon.h"
+#include "alloc-util.h"
#include "btrfs-util.h"
#include "export-tar.h"
#include "fd-util.h"
+#include "fileio.h"
#include "import-common.h"
#include "process-util.h"
#include "ratelimit.h"
diff --git a/src/import/export.c b/src/import/export.c
index 1ecd1e4e10..2b33d778d3 100644
--- a/src/import/export.c
+++ b/src/import/export.c
@@ -23,10 +23,12 @@
#include "sd-event.h"
+#include "alloc-util.h"
#include "event-util.h"
#include "export-raw.h"
#include "export-tar.h"
#include "fd-util.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-util.h"
#include "machine-image.h"
diff --git a/src/import/import-common.c b/src/import/import-common.c
index d96a000f81..a8551ca9e8 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -25,7 +25,7 @@
#include <unistd.h>
#include "btrfs-util.h"
-#include "capability.h"
+#include "capability-util.h"
#include "fd-util.h"
#include "import-common.h"
#include "signal-util.h"
diff --git a/src/import/import-compress.c b/src/import/import-compress.c
index d6b8133036..d4ff178f60 100644
--- a/src/import/import-compress.c
+++ b/src/import/import-compress.c
@@ -19,8 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "util.h"
#include "import-compress.h"
+#include "string-table.h"
+#include "util.h"
void import_compress_free(ImportCompress *c) {
assert(c);
diff --git a/src/import/import-raw.c b/src/import/import-raw.c
index a34f30abfc..2193d1d7f1 100644
--- a/src/import/import-raw.c
+++ b/src/import/import-raw.c
@@ -24,9 +24,13 @@
#include "sd-daemon.h"
#include "sd-event.h"
+#include "alloc-util.h"
#include "btrfs-util.h"
+#include "chattr-util.h"
#include "copy.h"
#include "fd-util.h"
+#include "fileio.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-common.h"
#include "import-compress.h"
diff --git a/src/import/import-tar.c b/src/import/import-tar.c
index 9aade0f430..2ae1d88168 100644
--- a/src/import/import-tar.c
+++ b/src/import/import-tar.c
@@ -24,9 +24,12 @@
#include "sd-daemon.h"
#include "sd-event.h"
+#include "alloc-util.h"
#include "btrfs-util.h"
#include "copy.h"
#include "fd-util.h"
+#include "fileio.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-common.h"
#include "import-compress.h"
diff --git a/src/import/import.c b/src/import/import.c
index e50ded9219..018b94d4c4 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -23,8 +23,10 @@
#include "sd-event.h"
+#include "alloc-util.h"
#include "event-util.h"
#include "fd-util.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-raw.h"
#include "import-tar.h"
diff --git a/src/import/importd.c b/src/import/importd.c
index b712cedcc6..4228681cea 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -23,6 +23,7 @@
#include "sd-bus.h"
+#include "alloc-util.h"
#include "bus-common-errors.h"
#include "bus-util.h"
#include "def.h"
@@ -32,12 +33,17 @@
#include "machine-pool.h"
#include "missing.h"
#include "mkdir.h"
+#include "parse-util.h"
#include "path-util.h"
#include "process-util.h"
#include "signal-util.h"
#include "socket-util.h"
+#include "string-table.h"
#include "strv.h"
+#include "syslog-util.h"
+#include "user-util.h"
#include "util.h"
+#include "web-util.h"
typedef struct Transfer Transfer;
typedef struct Manager Manager;
diff --git a/src/import/pull-common.c b/src/import/pull-common.c
index f465154b1d..d6567ba7ee 100644
--- a/src/import/pull-common.c
+++ b/src/import/pull-common.c
@@ -21,12 +21,15 @@
#include <sys/prctl.h>
+#include "alloc-util.h"
#include "btrfs-util.h"
-#include "capability.h"
+#include "capability-util.h"
#include "copy.h"
+#include "dirent-util.h"
#include "escape.h"
#include "fd-util.h"
#include "io-util.h"
+#include "path-util.h"
#include "process-util.h"
#include "pull-common.h"
#include "pull-job.h"
@@ -36,6 +39,7 @@
#include "string-util.h"
#include "strv.h"
#include "util.h"
+#include "web-util.h"
#define FILENAME_ESCAPE "/.#\"\'"
#define HASH_URL_THRESHOLD_LENGTH (_POSIX_PATH_MAX - 16)
diff --git a/src/import/pull-dkr.c b/src/import/pull-dkr.c
index 1cd9e7b0bd..831470ff13 100644
--- a/src/import/pull-dkr.c
+++ b/src/import/pull-dkr.c
@@ -24,10 +24,13 @@
#include "sd-daemon.h"
+#include "alloc-util.h"
#include "aufs-util.h"
#include "btrfs-util.h"
#include "curl-util.h"
#include "fd-util.h"
+#include "fileio.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-common.h"
#include "import-util.h"
@@ -42,6 +45,7 @@
#include "string-util.h"
#include "strv.h"
#include "utf8.h"
+#include "web-util.h"
typedef enum DkrProgress {
DKR_SEARCHING,
@@ -479,13 +483,13 @@ static int dkr_pull_make_local_copy(DkrPull *i, DkrPullVersion version) {
if (!i->final_path) {
i->final_path = strjoin(i->image_root, "/.dkr-", i->id, NULL);
if (!i->final_path)
- return log_oom();
+ return -ENOMEM;
}
if (version == DKR_PULL_V2) {
- r = path_get_parent(i->image_root, &p);
- if (r < 0)
- return r;
+ p = dirname_malloc(i->image_root);
+ if (!p)
+ return -ENOMEM;
}
r = pull_make_local_copy(i->final_path, p ?: i->image_root, i->local, i->force_local);
diff --git a/src/import/pull-job.c b/src/import/pull-job.c
index 4736306de2..824fa246ec 100644
--- a/src/import/pull-job.c
+++ b/src/import/pull-job.c
@@ -21,12 +21,16 @@
#include <sys/xattr.h>
+#include "alloc-util.h"
#include "fd-util.h"
+#include "hexdecoct.h"
#include "io-util.h"
#include "machine-pool.h"
+#include "parse-util.h"
#include "pull-job.h"
#include "string-util.h"
#include "strv.h"
+#include "xattr-util.h"
PullJob* pull_job_unref(PullJob *j) {
if (!j)
diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c
index 848a4fcd44..394131680d 100644
--- a/src/import/pull-raw.c
+++ b/src/import/pull-raw.c
@@ -25,10 +25,14 @@
#include "sd-daemon.h"
+#include "alloc-util.h"
#include "btrfs-util.h"
+#include "chattr-util.h"
#include "copy.h"
#include "curl-util.h"
#include "fd-util.h"
+#include "fileio.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-common.h"
#include "import-util.h"
@@ -44,6 +48,7 @@
#include "strv.h"
#include "utf8.h"
#include "util.h"
+#include "web-util.h"
typedef enum RawProgress {
RAW_DOWNLOADING,
diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c
index 3540bbff41..26c0bc5866 100644
--- a/src/import/pull-tar.c
+++ b/src/import/pull-tar.c
@@ -24,10 +24,13 @@
#include "sd-daemon.h"
+#include "alloc-util.h"
#include "btrfs-util.h"
#include "copy.h"
#include "curl-util.h"
#include "fd-util.h"
+#include "fileio.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-common.h"
#include "import-util.h"
@@ -43,6 +46,7 @@
#include "strv.h"
#include "utf8.h"
#include "util.h"
+#include "web-util.h"
typedef enum TarProgress {
TAR_DOWNLOADING,
diff --git a/src/import/pull.c b/src/import/pull.c
index 73d5f391c2..39f5b2d8e4 100644
--- a/src/import/pull.c
+++ b/src/import/pull.c
@@ -23,16 +23,19 @@
#include "sd-event.h"
+#include "alloc-util.h"
#include "event-util.h"
#include "hostname-util.h"
#include "import-util.h"
#include "machine-image.h"
+#include "parse-util.h"
#include "pull-dkr.h"
#include "pull-raw.h"
#include "pull-tar.h"
#include "signal-util.h"
#include "string-util.h"
#include "verbs.h"
+#include "web-util.h"
static bool arg_force = false;
static const char *arg_image_root = "/var/lib/machines";
diff --git a/src/import/qcow2-util.c b/src/import/qcow2-util.c
index fd3cf1b0e3..47dabaa86e 100644
--- a/src/import/qcow2-util.c
+++ b/src/import/qcow2-util.c
@@ -21,10 +21,11 @@
#include <zlib.h>
-#include "util.h"
-#include "sparse-endian.h"
-#include "qcow2-util.h"
+#include "alloc-util.h"
#include "btrfs-util.h"
+#include "qcow2-util.h"
+#include "sparse-endian.h"
+#include "util.h"
#define QCOW2_MAGIC 0x514649fb