summaryrefslogtreecommitdiff
path: root/src/sulogin-shell
diff options
context:
space:
mode:
authorHATAYAMA Daisuke <d.hatayama@fujitsu.com>2023-02-14 22:10:13 -0500
committerHATAYAMA Daisuke <d.hatayama@fujitsu.com>2023-02-14 22:10:13 -0500
commit2ffbf44344983d64949e032e74edb19c48b16cc0 (patch)
treeec9ec008b78469cbf8c0b93e7064cb7808c30b2e /src/sulogin-shell
parente8dc52766e1fdb4f8c09c3ab654d1270e1090c8d (diff)
downloadsystemd-2ffbf44344983d64949e032e74edb19c48b16cc0.tar.gz
sulogin: use DEFINE_MAIN_FUNCTION()
Let's use DEFINE_MAIN_FUNCTION() as the other commands for consistency. This commit should be no functional change.
Diffstat (limited to 'src/sulogin-shell')
-rw-r--r--src/sulogin-shell/sulogin-shell.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sulogin-shell/sulogin-shell.c b/src/sulogin-shell/sulogin-shell.c
index 5648dfd83b..e3601de8d4 100644
--- a/src/sulogin-shell/sulogin-shell.c
+++ b/src/sulogin-shell/sulogin-shell.c
@@ -14,6 +14,7 @@
#include "def.h"
#include "env-util.h"
#include "log.h"
+#include "main-func.h"
#include "process-util.h"
#include "signal-util.h"
#include "special.h"
@@ -86,7 +87,7 @@ static void print_mode(const char* mode) {
fflush(stdout);
}
-int main(int argc, char *argv[]) {
+static int run(int argc, char *argv[]) {
const char* sulogin_cmdline[] = {
SULOGIN,
NULL, /* --force */
@@ -115,5 +116,7 @@ int main(int argc, char *argv[]) {
r = start_default_target(bus);
}
- return r >= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+ return r;
}
+
+DEFINE_MAIN_FUNCTION(run);