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/service/servicecmd.h | |
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/service/servicecmd.h')
-rw-r--r-- | cmd/service/servicecmd.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/service/servicecmd.h b/cmd/service/servicecmd.h index e7cc998..d65c4b5 100644 --- a/cmd/service/servicecmd.h +++ b/cmd/service/servicecmd.h @@ -2,13 +2,14 @@ #ifndef SERVICECMD_H #define SERVICECMD_H +#include <stdbool.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include "service.h" -#include "util.h" +#include "config.h" /* Describes a command that can be launched by passing its name as @@ -45,7 +46,7 @@ service_t *loadsvc(const char *directory, const char *filename, int flags); Implemented in servicecmd.c. Prints program usage message and terminates with the given exit status. */ -void usage(int status) NORETURN; +void usage(int status) __attribute__((noreturn)); /* Write a message to stderr that advises the user how to consult the |