diff options
author | Ludwig Nussel <ludwig.nussel@suse.de> | 2022-02-09 10:59:22 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-02-22 11:36:29 +0100 |
commit | 6d7127d6dd0f3cfdf94d942f33ea9c3a783d887f (patch) | |
tree | c4f491f54b8acd9b257a12fa4bf6f36b5b98562b /src/systemctl/systemctl-compat-halt.c | |
parent | Merge pull request #22585 from poettering/analyze-split-up (diff) | |
download | systemd-6d7127d6dd0f3cfdf94d942f33ea9c3a783d887f.tar.xz systemd-6d7127d6dd0f3cfdf94d942f33ea9c3a783d887f.zip |
systemctl: improve error messages related to halt failures
Diffstat (limited to 'src/systemctl/systemctl-compat-halt.c')
-rw-r--r-- | src/systemctl/systemctl-compat-halt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-compat-halt.c b/src/systemctl/systemctl-compat-halt.c index c8d745592f..8a0e4e6294 100644 --- a/src/systemctl/systemctl-compat-halt.c +++ b/src/systemctl/systemctl-compat-halt.c @@ -76,6 +76,7 @@ int halt_parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); + /* called in sysvinit system as last command in shutdown/reboot so this is always forceful */ if (utmp_get_runlevel(&runlevel, NULL) >= 0) if (IN_SET(runlevel, '0', '6')) arg_force = 2; @@ -191,5 +192,5 @@ int halt_main(void) { return 0; r = halt_now(arg_action); - return log_error_errno(r, "Failed to reboot: %m"); + return log_error_errno(r, "Failed to %s: %m", action_table[arg_action].verb); } |