Fix check of executable name used for shutdown.
authorDavin McCall <davmac@davmac.org>
Sat, 17 Nov 2018 09:58:22 +0000 (09:58 +0000)
committerDavin McCall <davmac@davmac.org>
Sat, 17 Nov 2018 09:58:22 +0000 (09:58 +0000)
src/shutdown.cc

index d669d6b451d56e5146aa261b36067f4d8ceb1331..a04598fbfc94fbf763d241d5df3fb41b554f7ea0 100644 (file)
@@ -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;
     }