diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-11 22:56:30 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-11 22:56:30 -0400 |
commit | fa89550518af96a8804749c0ab0916599a94c1da (patch) | |
tree | 57db50190ad4bcdbc9ef54efc528db4286daedac /src/grp-login | |
parent | f4b50a2aa19f5a99008565f4127952ea8f2e4f61 (diff) |
Run the new fixup script.
The biggest change is that it keeps looking for new #include
blocks. This means that it (more) correctly handles #ifdef'd
#includes.
I'm not 100% in love with it, but it's pretty good for automated.
What I really don't like is it did some silly things with newlines
in typedef blocks. I've avoided committing those. I think it may
be possible to get it to do the right thing. But really, the
typedef blocks are a hack for poorly structured headers.
Now that it keeps looking for new #include blocks, I could strip
out the typedef support, and it would mostly work; but it wouldn't
be able to move some headers back to the top.
IDK what to do.
Diffstat (limited to 'src/grp-login')
-rw-r--r-- | src/grp-login/systemd-logind/logind-action.h | 3 | ||||
-rw-r--r-- | src/grp-login/systemd-logind/logind-core.c | 3 | ||||
-rw-r--r-- | src/grp-login/systemd-logind/logind-dbus.c | 3 | ||||
-rw-r--r-- | src/grp-login/systemd-logind/logind-seat-dbus.c | 2 | ||||
-rw-r--r-- | src/grp-login/systemd-logind/logind-session-dbus.c | 2 | ||||
-rw-r--r-- | src/grp-login/systemd-logind/logind-session.h | 6 | ||||
-rw-r--r-- | src/grp-login/systemd-logind/logind-user-dbus.c | 2 | ||||
-rw-r--r-- | src/grp-login/systemd-logind/logind-utmp.c | 3 |
8 files changed, 13 insertions, 11 deletions
diff --git a/src/grp-login/systemd-logind/logind-action.h b/src/grp-login/systemd-logind/logind-action.h index 39ba3cf0f6..fb40ae48d2 100644 --- a/src/grp-login/systemd-logind/logind-action.h +++ b/src/grp-login/systemd-logind/logind-action.h @@ -33,9 +33,8 @@ typedef enum HandleAction { _HANDLE_ACTION_INVALID = -1 } HandleAction; -#include "logind.h" - #include "logind-inhibit.h" +#include "logind.h" int manager_handle_action( Manager *m, diff --git a/src/grp-login/systemd-logind/logind-core.c b/src/grp-login/systemd-logind/logind-core.c index 1d6475f8d7..13ea97ae0d 100644 --- a/src/grp-login/systemd-logind/logind-core.c +++ b/src/grp-login/systemd-logind/logind-core.c @@ -30,11 +30,12 @@ #include "basic/strv.h" #include "basic/terminal-util.h" #include "basic/user-util.h" -#include "logind.h" #include "sd-bus/bus-error.h" #include "shared/bus-util.h" #include "shared/udev-util.h" +#include "logind.h" + int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) { Device *d; diff --git a/src/grp-login/systemd-logind/logind-dbus.c b/src/grp-login/systemd-logind/logind-dbus.c index cb51e43a5c..282ba64a3d 100644 --- a/src/grp-login/systemd-logind/logind-dbus.c +++ b/src/grp-login/systemd-logind/logind-dbus.c @@ -41,7 +41,6 @@ #include "basic/terminal-util.h" #include "basic/unit-name.h" #include "basic/user-util.h" -#include "logind.h" #include "sd-bus/bus-common-errors.h" #include "sd-bus/bus-error.h" #include "shared/bus-util.h" @@ -50,6 +49,8 @@ #include "shared/udev-util.h" #include "shared/utmp-wtmp.h" +#include "logind.h" + int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret) { _cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; Session *session; diff --git a/src/grp-login/systemd-logind/logind-seat-dbus.c b/src/grp-login/systemd-logind/logind-seat-dbus.c index fbebe6fcff..e4febe1ab5 100644 --- a/src/grp-login/systemd-logind/logind-seat-dbus.c +++ b/src/grp-login/systemd-logind/logind-seat-dbus.c @@ -25,11 +25,11 @@ #include "basic/strv.h" #include "basic/user-util.h" #include "basic/util.h" -#include "logind.h" #include "sd-bus/bus-common-errors.h" #include "shared/bus-util.h" #include "logind-seat.h" +#include "logind.h" static int property_get_active_session( sd_bus *bus, diff --git a/src/grp-login/systemd-logind/logind-session-dbus.c b/src/grp-login/systemd-logind/logind-session-dbus.c index 76228d4474..f79f9b5003 100644 --- a/src/grp-login/systemd-logind/logind-session-dbus.c +++ b/src/grp-login/systemd-logind/logind-session-dbus.c @@ -26,12 +26,12 @@ #include "basic/signal-util.h" #include "basic/strv.h" #include "basic/util.h" -#include "logind.h" #include "sd-bus/bus-common-errors.h" #include "shared/bus-util.h" #include "logind-session-device.h" #include "logind-session.h" +#include "logind.h" static int property_get_user( sd_bus *bus, diff --git a/src/grp-login/systemd-logind/logind-session.h b/src/grp-login/systemd-logind/logind-session.h index 23ff6576c9..976046d847 100644 --- a/src/grp-login/systemd-logind/logind-session.h +++ b/src/grp-login/systemd-logind/logind-session.h @@ -19,12 +19,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -typedef struct Session Session; -typedef enum KillWho KillWho; - #include "basic/list.h" #include "basic/login-util.h" +typedef enum KillWho KillWho; +typedef struct Session Session; + #include "logind-user.h" typedef enum SessionState { diff --git a/src/grp-login/systemd-logind/logind-user-dbus.c b/src/grp-login/systemd-logind/logind-user-dbus.c index d82ced605e..57d1c857e6 100644 --- a/src/grp-login/systemd-logind/logind-user-dbus.c +++ b/src/grp-login/systemd-logind/logind-user-dbus.c @@ -25,10 +25,10 @@ #include "basic/signal-util.h" #include "basic/strv.h" #include "basic/user-util.h" -#include "logind.h" #include "shared/bus-util.h" #include "logind-user.h" +#include "logind.h" static int property_get_display( sd_bus *bus, diff --git a/src/grp-login/systemd-logind/logind-utmp.c b/src/grp-login/systemd-logind/logind-utmp.c index c5dc137d61..1e97083f78 100644 --- a/src/grp-login/systemd-logind/logind-utmp.c +++ b/src/grp-login/systemd-logind/logind-utmp.c @@ -31,12 +31,13 @@ #include "basic/strv.h" #include "basic/unit-name.h" #include "basic/user-util.h" -#include "logind.h" #include "sd-bus/bus-common-errors.h" #include "sd-bus/bus-error.h" #include "shared/bus-util.h" #include "shared/utmp-wtmp.h" +#include "logind.h" + _const_ static usec_t when_wall(usec_t n, usec_t elapse) { usec_t left; |