mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
sysctl: port to use DEFINE_MAIN_FUNCTION()
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
6bc7a6ac2c
commit
8eb42d9050
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user