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/login | |
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/login')
-rw-r--r-- | src/login/inhibit.c | 1 | ||||
-rw-r--r-- | src/login/logind-acl.c | 3 | ||||
-rw-r--r-- | src/login/logind-button.c | 3 | ||||
-rw-r--r-- | src/login/logind-core.c | 9 | ||||
-rw-r--r-- | src/login/logind-dbus.c | 1 | ||||
-rw-r--r-- | src/login/logind-inhibit.c | 3 | ||||
-rw-r--r-- | src/login/logind-seat.c | 3 | ||||
-rw-r--r-- | src/login/logind-session-dbus.c | 12 | ||||
-rw-r--r-- | src/login/logind-session-device.c | 5 | ||||
-rw-r--r-- | src/login/logind-session.c | 3 | ||||
-rw-r--r-- | src/login/logind-user.c | 3 | ||||
-rw-r--r-- | src/login/logind.c | 3 | ||||
-rw-r--r-- | src/login/pam_systemd.c | 1 | ||||
-rw-r--r-- | src/login/test-inhibit.c | 1 |
14 files changed, 32 insertions, 19 deletions
diff --git a/src/login/inhibit.c b/src/login/inhibit.c index e671341b42..5ff0957aed 100644 --- a/src/login/inhibit.c +++ b/src/login/inhibit.c @@ -29,6 +29,7 @@ #include "bus-error.h" #include "bus-util.h" +#include "fd-util.h" #include "formats-util.h" #include "process-util.h" #include "signal-util.h" diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c index 1acdc5aa22..4d7bda3ee0 100644 --- a/src/login/logind-acl.c +++ b/src/login/logind-acl.c @@ -24,12 +24,13 @@ #include "acl-util.h" #include "escape.h" +#include "fd-util.h" #include "formats-util.h" +#include "logind-acl.h" #include "set.h" #include "string-util.h" #include "udev-util.h" #include "util.h" -#include "logind-acl.h" static int flush_acl(acl_t acl) { acl_entry_t i; diff --git a/src/login/logind-button.c b/src/login/logind-button.c index caa844e601..b98035be21 100644 --- a/src/login/logind-button.c +++ b/src/login/logind-button.c @@ -28,9 +28,10 @@ #include "sd-messages.h" +#include "fd-util.h" +#include "logind-button.h" #include "string-util.h" #include "util.h" -#include "logind-button.h" Button* button_new(Manager *m, const char *name) { Button *b; diff --git a/src/login/logind-core.c b/src/login/logind-core.c index 6c05c11dbd..3b6e982e9f 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -25,13 +25,14 @@ #include <pwd.h> #include <linux/vt.h> -#include "strv.h" -#include "cgroup-util.h" -#include "bus-util.h" #include "bus-error.h" -#include "udev-util.h" +#include "bus-util.h" +#include "cgroup-util.h" +#include "fd-util.h" #include "logind.h" +#include "strv.h" #include "terminal-util.h" +#include "udev-util.h" int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) { Device *d; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 66807b3894..1677785467 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -32,6 +32,7 @@ #include "bus-util.h" #include "efivars.h" #include "escape.h" +#include "fd-util.h" #include "fileio-label.h" #include "formats-util.h" #include "logind.h" diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index 5b247f48d6..ec34535f83 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -25,12 +25,13 @@ #include <unistd.h> #include "escape.h" +#include "fd-util.h" #include "fileio.h" #include "formats-util.h" +#include "logind-inhibit.h" #include "mkdir.h" #include "string-util.h" #include "util.h" -#include "logind-inhibit.h" Inhibitor* inhibitor_new(Manager *m, const char* id) { Inhibitor *i; diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 757993a953..dad552d5f2 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -26,13 +26,14 @@ #include "sd-messages.h" +#include "fd-util.h" #include "formats-util.h" #include "logind-acl.h" +#include "logind-seat.h" #include "mkdir.h" #include "string-util.h" #include "terminal-util.h" #include "util.h" -#include "logind-seat.h" Seat *seat_new(Manager *m, const char *id) { Seat *s; diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index e6b4ccd7c6..fe398a5eb6 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -22,15 +22,15 @@ #include <errno.h> #include <string.h> -#include "util.h" -#include "strv.h" -#include "bus-util.h" #include "bus-common-errors.h" #include "bus-label.h" - -#include "logind.h" -#include "logind-session.h" +#include "bus-util.h" +#include "fd-util.h" #include "logind-session-device.h" +#include "logind-session.h" +#include "logind.h" +#include "strv.h" +#include "util.h" static int property_get_user( sd_bus *bus, diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c index d4d9052d10..3a0bb720f9 100644 --- a/src/login/logind-session-device.c +++ b/src/login/logind-session-device.c @@ -27,10 +27,11 @@ #include "libudev.h" -#include "util.h" -#include "missing.h" #include "bus-util.h" +#include "fd-util.h" #include "logind-session-device.h" +#include "missing.h" +#include "util.h" enum SessionDeviceNotifications { SESSION_DEVICE_RESUME, diff --git a/src/login/logind-session.c b/src/login/logind-session.c index e35b5e71a1..ead79ad327 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -34,13 +34,14 @@ #include "bus-error.h" #include "bus-util.h" #include "escape.h" +#include "fd-util.h" #include "fileio.h" #include "formats-util.h" +#include "logind-session.h" #include "mkdir.h" #include "path-util.h" #include "terminal-util.h" #include "util.h" -#include "logind-session.h" #define RELEASE_USEC (20*USEC_PER_SEC) diff --git a/src/login/logind-user.c b/src/login/logind-user.c index ecfbf2c5cc..80328068cd 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -29,10 +29,12 @@ #include "clean-ipc.h" #include "conf-parser.h" #include "escape.h" +#include "fd-util.h" #include "fileio.h" #include "formats-util.h" #include "hashmap.h" #include "label.h" +#include "logind-user.h" #include "mkdir.h" #include "path-util.h" #include "rm-rf.h" @@ -40,7 +42,6 @@ #include "special.h" #include "unit-name.h" #include "util.h" -#include "logind-user.h" User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name) { User *u; diff --git a/src/login/logind.c b/src/login/logind.c index 6ce7e1fd78..02c87ca58e 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -30,11 +30,12 @@ #include "bus-error.h" #include "bus-util.h" #include "conf-parser.h" +#include "fd-util.h" #include "formats-util.h" +#include "logind.h" #include "signal-util.h" #include "strv.h" #include "udev-util.h" -#include "logind.h" static void manager_free(Manager *m); diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 63c31a6f62..dbd055a79a 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -35,6 +35,7 @@ #include "bus-error.h" #include "bus-util.h" #include "def.h" +#include "fd-util.h" #include "fileio.h" #include "formats-util.h" #include "hostname-util.h" diff --git a/src/login/test-inhibit.c b/src/login/test-inhibit.c index f231e54cde..d0727ff7c7 100644 --- a/src/login/test-inhibit.c +++ b/src/login/test-inhibit.c @@ -24,6 +24,7 @@ #include "sd-bus.h" #include "bus-util.h" +#include "fd-util.h" #include "macro.h" #include "util.h" |