diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-20 11:28:19 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-20 16:48:20 +0100 |
commit | 8eb42d9050154a8d77aab16fc220d3ef32319ebe (patch) | |
tree | 1358dfad7cc4a5fb3c36a27e27cd0ee128d26375 /src/sysctl | |
parent | 6bc7a6ac2cb44acc2aab2cf9e13caef81f56ce04 (diff) | |
download | systemd-8eb42d9050154a8d77aab16fc220d3ef32319ebe.tar.gz |
sysctl: port to use DEFINE_MAIN_FUNCTION()
Diffstat (limited to 'src/sysctl')
-rw-r--r-- | src/sysctl/sysctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index a9d30dea5f..d0d152edfd 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -14,6 +14,7 @@ #include "fileio.h" #include "hashmap.h" #include "log.h" +#include "main-func.h" #include "pager.h" #include "path-util.h" #include "string-util.h" @@ -261,7 +262,7 @@ static int parse_argv(int argc, char *argv[]) { return 1; } -int main(int argc, char *argv[]) { +static int run(int argc, char *argv[]) { OrderedHashmap *sysctl_options = NULL; int r = 0, k; @@ -323,5 +324,7 @@ finish: ordered_hashmap_free_free_free(sysctl_options); strv_free(arg_prefixes); - return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + return r; } + +DEFINE_MAIN_FUNCTION(run); |