diff options
author | David Oberhollenzer <goliath@infraroot.at> | 2020-03-31 18:19:27 +0200 |
---|---|---|
committer | David Oberhollenzer <goliath@infraroot.at> | 2020-03-31 18:19:27 +0200 |
commit | 87a524d9313428d55e5a04c2538042629bdc467a (patch) | |
tree | 37d513ffcb56666d6993bc27096144896cedfc32 /cmd/shutdown.c | |
parent | 9f9807d4d3e0ecabc9bb67658d58644d714a9fd7 (diff) |
cleanup: delete remains of libutil
- exec_t belongs to service.h, the main place where it is used/needed
- code for executing exec_t is moved to runsvc for the same reason
- what is left are NORETURN and ARRAY_SIZE
- the former can be replaced with direct attribute usage since
the only relevant compilers all support the attribute.
- the later is only used in 3 places and can be trivially replaced
with direct usage of sizeof().
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'cmd/shutdown.c')
-rw-r--r-- | cmd/shutdown.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/shutdown.c b/cmd/shutdown.c index 546b076..afceec2 100644 --- a/cmd/shutdown.c +++ b/cmd/shutdown.c @@ -10,8 +10,6 @@ #include <sys/reboot.h> #include <linux/reboot.h> -#include "util.h" - #define FL_FORCE 0x01 #define FL_NOSYNC 0x02 @@ -29,7 +27,7 @@ static const char *shortopt = "hprfn"; static const char *defact_str = "power-off"; static int defact = RB_POWER_OFF; -static NORETURN void usage(const char *progname, int status) +static __attribute__((noreturn)) void usage(const char *progname, int status) { fprintf(status == EXIT_SUCCESS ? stdout : stderr, "%s [OPTIONS...]\n\n" |