diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-25 13:14:12 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-25 13:19:18 +0100 |
commit | 3ffd4af22052963e7a29431721ee204e634bea75 (patch) | |
tree | fe60142dfddd37cfc02b7a135542107e772b36c3 /src/nspawn | |
parent | 04c0136989b7eb896bfb0fb176e11233d69e1453 (diff) |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over.
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn-cgroup.c | 3 | ||||
-rw-r--r-- | src/nspawn/nspawn-expose-ports.c | 3 | ||||
-rw-r--r-- | src/nspawn/nspawn-setuid.c | 3 | ||||
-rw-r--r-- | src/nspawn/nspawn.c | 1 |
4 files changed, 7 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c index 9e1f58f730..4e86ed13cb 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c @@ -22,12 +22,13 @@ #include <sys/mount.h> #include "cgroup-util.h" +#include "fd-util.h" #include "fileio.h" #include "mkdir.h" +#include "nspawn-cgroup.h" #include "string-util.h" #include "strv.h" #include "util.h" -#include "nspawn-cgroup.h" int chown_cgroup(pid_t pid, uid_t uid_shift) { _cleanup_free_ char *path = NULL, *fs = NULL; diff --git a/src/nspawn/nspawn-expose-ports.c b/src/nspawn/nspawn-expose-ports.c index 1081a38c58..df9fbe185b 100644 --- a/src/nspawn/nspawn-expose-ports.c +++ b/src/nspawn/nspawn-expose-ports.c @@ -21,13 +21,14 @@ #include "sd-netlink.h" +#include "fd-util.h" #include "firewall-util.h" #include "in-addr-util.h" #include "local-addresses.h" #include "netlink-util.h" +#include "nspawn-expose-ports.h" #include "string-util.h" #include "util.h" -#include "nspawn-expose-ports.h" int expose_port_parse(ExposePort **l, const char *s) { diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c index b6d18574e8..2a1dfd83a9 100644 --- a/src/nspawn/nspawn-setuid.c +++ b/src/nspawn/nspawn-setuid.c @@ -23,12 +23,13 @@ #include <sys/types.h> #include <unistd.h> +#include "fd-util.h" #include "mkdir.h" +#include "nspawn-setuid.h" #include "process-util.h" #include "signal-util.h" #include "string-util.h" #include "util.h" -#include "nspawn-setuid.h" static int spawn_getent(const char *database, const char *key, pid_t *rpid) { int pipe_fds[2]; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 8ef6cfd731..f95842d252 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -57,6 +57,7 @@ #include "dev-setup.h" #include "env-util.h" #include "event-util.h" +#include "fd-util.h" #include "fdset.h" #include "fileio.h" #include "formats-util.h" |