From 34310cd5bc28070309e9f0de4e2a3a0e44728d7c Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sat, 17 Nov 2018 09:58:22 +0000 Subject: [PATCH] Fix check of executable name used for shutdown. --- src/shutdown.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shutdown.cc b/src/shutdown.cc index d669d6b..a04598f 100644 --- a/src/shutdown.cc +++ b/src/shutdown.cc @@ -250,7 +250,7 @@ int main(int argc, char **argv) auto shutdown_type = shutdown_type_t::POWEROFF; const char *execname = base_name(argv[0]); - if (strcmp(execname, "reboot")) { + if (strcmp(execname, "reboot") == 0) { shutdown_type = shutdown_type_t::REBOOT; } -- 2.25.1