-
-
Save floppym/0e0e029c93b61c7089620d023fb5798c to your computer and use it in GitHub Desktop.
stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/halt.c b/src/halt.c | |
index a469147..1d4b6ed 100644 | |
--- a/src/halt.c | |
+++ b/src/halt.c | |
@@ -162,8 +162,8 @@ void do_shutdown(char *fl, int should_poweroff, char *tm) | |
args[i++] = "shutdown"; | |
args[i++] = fl; | |
- if ( (! strcmp(fl, "-h") ) && (should_poweroff) ) | |
- args[i++] = "-P"; | |
+ if (!strcmp(fl, "-h")) | |
+ args[i++] = (should_poweroff ? "-P" : "-H"); | |
if (tm) { | |
args[i++] = "-t"; | |
args[i++] = tm; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment