summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl-logind.c
diff options
context:
space:
mode:
authorDeepak Rawat <drawat.floss@gmail.com>2021-03-29 20:22:16 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-03-31 10:48:48 +0200
commit0d96caa5c052f59d5b0dbfa1df0730145fb5eb15 (patch)
tree2df0012d8682ad1db99a01a8ce126933653fa371 /src/systemctl/systemctl-logind.c
parenta93af34a4011ce92b079420bc4ed75857e34226c (diff)
downloadsystemd-0d96caa5c052f59d5b0dbfa1df0730145fb5eb15.tar.gz
logind: Add new flag for kexec reboot
Add new flag to allow kexec reboot if kernel is already loaded.
Diffstat (limited to 'src/systemctl/systemctl-logind.c')
-rw-r--r--src/systemctl/systemctl-logind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemctl/systemctl-logind.c b/src/systemctl/systemctl-logind.c
index 103f81647d..15e396ebd7 100644
--- a/src/systemctl/systemctl-logind.c
+++ b/src/systemctl/systemctl-logind.c
@@ -50,6 +50,7 @@ int logind_reboot(enum action a) {
} actions[_ACTION_MAX] = {
[ACTION_POWEROFF] = { "PowerOff", "power off system" },
[ACTION_REBOOT] = { "Reboot", "reboot system" },
+ [ACTION_KEXEC] = { "Reboot", "kexec reboot system" },
[ACTION_HALT] = { "Halt", "halt system" },
[ACTION_SUSPEND] = { "Suspend", "suspend system" },
[ACTION_HIBERNATE] = { "Hibernate", "hibernate system" },
@@ -79,6 +80,7 @@ int logind_reboot(enum action a) {
return 0;
SET_FLAG(flags, SD_LOGIND_ROOT_CHECK_INHIBITORS, arg_check_inhibitors > 0);
+ SET_FLAG(flags, SD_LOGIND_KEXEC_REBOOT, a == ACTION_KEXEC);
method_with_flags = strjoina(actions[a].method, "WithFlags");