diff options
author | Tom Gundersen <teg@jklm.no> | 2015-10-25 14:22:43 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-25 14:22:43 +0100 |
commit | 7c8871d31510865e40c8628ef765996202a3cc00 (patch) | |
tree | 622b7aa085999fe3d2908772ff0d0c6ec5bf4400 /src/import | |
parent | 7c257428969aaba2acc4e26753c86d6f4774354a (diff) | |
parent | f00022dd121c73b543ae667ddce9814bd67a1b73 (diff) |
Merge pull request #1654 from poettering/util-lib
Various changes to src/basic/
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/aufs-util.c | 3 | ||||
-rw-r--r-- | src/import/curl-util.c | 2 | ||||
-rw-r--r-- | src/import/curl-util.h | 3 | ||||
-rw-r--r-- | src/import/export-raw.c | 9 | ||||
-rw-r--r-- | src/import/export-tar.c | 11 | ||||
-rw-r--r-- | src/import/export.c | 2 | ||||
-rw-r--r-- | src/import/import-common.c | 3 | ||||
-rw-r--r-- | src/import/import-raw.c | 21 | ||||
-rw-r--r-- | src/import/import-tar.c | 21 | ||||
-rw-r--r-- | src/import/import.c | 2 | ||||
-rw-r--r-- | src/import/importd.c | 18 | ||||
-rw-r--r-- | src/import/pull-common.c | 15 | ||||
-rw-r--r-- | src/import/pull-dkr.c | 25 | ||||
-rw-r--r-- | src/import/pull-job.c | 4 | ||||
-rw-r--r-- | src/import/pull-raw.c | 29 | ||||
-rw-r--r-- | src/import/pull-tar.c | 23 | ||||
-rw-r--r-- | src/import/pull.c | 1 | ||||
-rw-r--r-- | src/import/test-qcow2.c | 4 |
18 files changed, 116 insertions, 80 deletions
diff --git a/src/import/aufs-util.c b/src/import/aufs-util.c index 18c42b8b6d..7b1ac134a0 100644 --- a/src/import/aufs-util.c +++ b/src/import/aufs-util.c @@ -21,8 +21,9 @@ #include <ftw.h> -#include "util.h" #include "rm-rf.h" +#include "string-util.h" +#include "util.h" #include "aufs-util.h" static int nftw_cb( diff --git a/src/import/curl-util.c b/src/import/curl-util.c index d390cfb1f3..455fa1e07d 100644 --- a/src/import/curl-util.c +++ b/src/import/curl-util.c @@ -20,6 +20,8 @@ ***/ #include "curl-util.h" +#include "fd-util.h" +#include "string-util.h" static void curl_glue_check_finished(CurlGlue *g) { CURLMsg *msg; diff --git a/src/import/curl-util.h b/src/import/curl-util.h index c249069ffa..6a2aa81c76 100644 --- a/src/import/curl-util.h +++ b/src/import/curl-util.h @@ -24,9 +24,10 @@ #include <sys/types.h> #include <curl/curl.h> -#include "hashmap.h" #include "sd-event.h" +#include "hashmap.h" + typedef struct CurlGlue CurlGlue; struct CurlGlue { diff --git a/src/import/export-raw.c b/src/import/export-raw.c index 8f9c9bbc80..24c0ec9309 100644 --- a/src/import/export-raw.c +++ b/src/import/export-raw.c @@ -24,12 +24,15 @@ #undef basename #include "sd-daemon.h" -#include "util.h" -#include "ratelimit.h" + #include "btrfs-util.h" #include "copy.h" -#include "import-common.h" #include "export-raw.h" +#include "fd-util.h" +#include "import-common.h" +#include "ratelimit.h" +#include "string-util.h" +#include "util.h" #define COPY_BUFFER_SIZE (16*1024) diff --git a/src/import/export-tar.c b/src/import/export-tar.c index a623745f5f..aa9b7f1a91 100644 --- a/src/import/export-tar.c +++ b/src/import/export-tar.c @@ -19,15 +19,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <sys/sendfile.h> - #include "sd-daemon.h" -#include "util.h" -#include "ratelimit.h" + #include "btrfs-util.h" -#include "import-common.h" #include "export-tar.h" +#include "fd-util.h" +#include "import-common.h" #include "process-util.h" +#include "ratelimit.h" +#include "string-util.h" +#include "util.h" #define COPY_BUFFER_SIZE (16*1024) diff --git a/src/import/export.c b/src/import/export.c index d34105e4ca..1ecd1e4e10 100644 --- a/src/import/export.c +++ b/src/import/export.c @@ -26,10 +26,12 @@ #include "event-util.h" #include "export-raw.h" #include "export-tar.h" +#include "fd-util.h" #include "hostname-util.h" #include "import-util.h" #include "machine-image.h" #include "signal-util.h" +#include "string-util.h" #include "verbs.h" static ImportCompressType arg_compress = IMPORT_COMPRESS_UNKNOWN; diff --git a/src/import/import-common.c b/src/import/import-common.c index 9b86dbfa79..d96a000f81 100644 --- a/src/import/import-common.c +++ b/src/import/import-common.c @@ -26,9 +26,10 @@ #include "btrfs-util.h" #include "capability.h" +#include "fd-util.h" +#include "import-common.h" #include "signal-util.h" #include "util.h" -#include "import-common.h" int import_make_read_only_fd(int fd) { int r; diff --git a/src/import/import-raw.c b/src/import/import-raw.c index 5f7d25d063..f8fc6c108a 100644 --- a/src/import/import-raw.c +++ b/src/import/import-raw.c @@ -23,19 +23,22 @@ #include "sd-daemon.h" #include "sd-event.h" -#include "util.h" -#include "path-util.h" + #include "btrfs-util.h" -#include "hostname-util.h" #include "copy.h" -#include "mkdir.h" -#include "rm-rf.h" -#include "ratelimit.h" -#include "machine-pool.h" -#include "qcow2-util.h" -#include "import-compress.h" +#include "fd-util.h" +#include "hostname-util.h" #include "import-common.h" +#include "import-compress.h" #include "import-raw.h" +#include "machine-pool.h" +#include "mkdir.h" +#include "path-util.h" +#include "qcow2-util.h" +#include "ratelimit.h" +#include "rm-rf.h" +#include "string-util.h" +#include "util.h" struct RawImport { sd_event *event; diff --git a/src/import/import-tar.c b/src/import/import-tar.c index 5c288d438e..bc0cd9f5ba 100644 --- a/src/import/import-tar.c +++ b/src/import/import-tar.c @@ -23,20 +23,23 @@ #include "sd-daemon.h" #include "sd-event.h" -#include "util.h" -#include "path-util.h" + #include "btrfs-util.h" -#include "hostname-util.h" #include "copy.h" -#include "mkdir.h" -#include "rm-rf.h" -#include "ratelimit.h" -#include "machine-pool.h" -#include "qcow2-util.h" -#include "import-compress.h" +#include "fd-util.h" +#include "hostname-util.h" #include "import-common.h" +#include "import-compress.h" #include "import-tar.h" +#include "machine-pool.h" +#include "mkdir.h" +#include "path-util.h" #include "process-util.h" +#include "qcow2-util.h" +#include "ratelimit.h" +#include "rm-rf.h" +#include "string-util.h" +#include "util.h" struct TarImport { sd_event *event; diff --git a/src/import/import.c b/src/import/import.c index 1c92312585..e50ded9219 100644 --- a/src/import/import.c +++ b/src/import/import.c @@ -24,12 +24,14 @@ #include "sd-event.h" #include "event-util.h" +#include "fd-util.h" #include "hostname-util.h" #include "import-raw.h" #include "import-tar.h" #include "import-util.h" #include "machine-image.h" #include "signal-util.h" +#include "string-util.h" #include "verbs.h" static bool arg_force = false; diff --git a/src/import/importd.c b/src/import/importd.c index a29e9d4bd5..b712cedcc6 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -22,20 +22,22 @@ #include <sys/prctl.h> #include "sd-bus.h" -#include "util.h" -#include "strv.h" -#include "bus-util.h" + #include "bus-common-errors.h" -#include "socket-util.h" -#include "mkdir.h" +#include "bus-util.h" #include "def.h" -#include "missing.h" +#include "fd-util.h" +#include "hostname-util.h" +#include "import-util.h" #include "machine-pool.h" +#include "missing.h" +#include "mkdir.h" #include "path-util.h" -#include "import-util.h" #include "process-util.h" #include "signal-util.h" -#include "hostname-util.h" +#include "socket-util.h" +#include "strv.h" +#include "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 edebb91556..e98554b60c 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -21,17 +21,20 @@ #include <sys/prctl.h> -#include "util.h" -#include "strv.h" -#include "copy.h" -#include "rm-rf.h" #include "btrfs-util.h" #include "capability.h" -#include "pull-job.h" -#include "pull-common.h" +#include "copy.h" +#include "escape.h" +#include "fd-util.h" #include "process-util.h" +#include "pull-common.h" +#include "pull-job.h" +#include "rm-rf.h" #include "signal-util.h" #include "siphash24.h" +#include "string-util.h" +#include "strv.h" +#include "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 84211d282b..1cd9e7b0bd 100644 --- a/src/import/pull-dkr.c +++ b/src/import/pull-dkr.c @@ -23,22 +23,25 @@ #include <sys/prctl.h> #include "sd-daemon.h" -#include "json.h" -#include "strv.h" + +#include "aufs-util.h" #include "btrfs-util.h" -#include "utf8.h" +#include "curl-util.h" +#include "fd-util.h" +#include "hostname-util.h" +#include "import-common.h" +#include "import-util.h" +#include "json.h" #include "mkdir.h" -#include "rm-rf.h" #include "path-util.h" -#include "import-util.h" -#include "curl-util.h" -#include "aufs-util.h" -#include "pull-job.h" +#include "process-util.h" #include "pull-common.h" -#include "import-common.h" #include "pull-dkr.h" -#include "process-util.h" -#include "hostname-util.h" +#include "pull-job.h" +#include "rm-rf.h" +#include "string-util.h" +#include "strv.h" +#include "utf8.h" typedef enum DkrProgress { DKR_SEARCHING, diff --git a/src/import/pull-job.c b/src/import/pull-job.c index 42939f2104..7a0fb54bbe 100644 --- a/src/import/pull-job.c +++ b/src/import/pull-job.c @@ -21,9 +21,11 @@ #include <sys/xattr.h> -#include "strv.h" +#include "fd-util.h" #include "machine-pool.h" #include "pull-job.h" +#include "string-util.h" +#include "strv.h" PullJob* pull_job_unref(PullJob *j) { if (!j) diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c index 3e13f4ea9a..848a4fcd44 100644 --- a/src/import/pull-raw.c +++ b/src/import/pull-raw.c @@ -19,28 +19,31 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <sys/xattr.h> -#include <linux/fs.h> #include <curl/curl.h> +#include <linux/fs.h> +#include <sys/xattr.h> #include "sd-daemon.h" -#include "utf8.h" -#include "strv.h" -#include "copy.h" + #include "btrfs-util.h" -#include "util.h" +#include "copy.h" +#include "curl-util.h" +#include "fd-util.h" +#include "hostname-util.h" +#include "import-common.h" +#include "import-util.h" #include "macro.h" #include "mkdir.h" -#include "rm-rf.h" #include "path-util.h" -#include "hostname-util.h" -#include "import-util.h" -#include "import-common.h" -#include "curl-util.h" -#include "qcow2-util.h" -#include "pull-job.h" #include "pull-common.h" +#include "pull-job.h" #include "pull-raw.h" +#include "qcow2-util.h" +#include "rm-rf.h" +#include "string-util.h" +#include "strv.h" +#include "utf8.h" +#include "util.h" typedef enum RawProgress { RAW_DOWNLOADING, diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c index bd35f1b842..3540bbff41 100644 --- a/src/import/pull-tar.c +++ b/src/import/pull-tar.c @@ -23,23 +23,26 @@ #include <curl/curl.h> #include "sd-daemon.h" -#include "utf8.h" -#include "strv.h" -#include "copy.h" + #include "btrfs-util.h" -#include "util.h" +#include "copy.h" +#include "curl-util.h" +#include "fd-util.h" +#include "hostname-util.h" +#include "import-common.h" +#include "import-util.h" #include "macro.h" #include "mkdir.h" -#include "rm-rf.h" #include "path-util.h" #include "process-util.h" -#include "hostname-util.h" -#include "import-util.h" -#include "import-common.h" -#include "curl-util.h" -#include "pull-job.h" #include "pull-common.h" +#include "pull-job.h" #include "pull-tar.h" +#include "rm-rf.h" +#include "string-util.h" +#include "strv.h" +#include "utf8.h" +#include "util.h" typedef enum TarProgress { TAR_DOWNLOADING, diff --git a/src/import/pull.c b/src/import/pull.c index 29e9424b52..73d5f391c2 100644 --- a/src/import/pull.c +++ b/src/import/pull.c @@ -31,6 +31,7 @@ #include "pull-raw.h" #include "pull-tar.h" #include "signal-util.h" +#include "string-util.h" #include "verbs.h" static bool arg_force = false; diff --git a/src/import/test-qcow2.c b/src/import/test-qcow2.c index 9a6c3e8b35..4b60079619 100644 --- a/src/import/test-qcow2.c +++ b/src/import/test-qcow2.c @@ -19,10 +19,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "fd-util.h" #include "log.h" -#include "util.h" - #include "qcow2-util.h" +#include "util.h" int main(int argc, char *argv[]) { _cleanup_close_ int sfd = -1, dfd = -1; |