summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp')
-rw-r--r--src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp b/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
index a1da642c..e58365ac 100644
--- a/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
@@ -47,20 +47,24 @@ RTDECL(int) RTSystemShutdown(RTMSINTERVAL cMsDelay, uint32_t fFlags, const char
* Assemble the argument vector.
*/
int iArg = 0;
- const char *apszArgs[5];
+ const char *apszArgs[6];
+
+ RT_BZERO(apszArgs, sizeof(apszArgs));
apszArgs[iArg++] = "/sbin/shutdown";
switch (fFlags & RTSYSTEM_SHUTDOWN_ACTION_MASK)
{
case RTSYSTEM_SHUTDOWN_HALT:
- apszArgs[iArg++] = "--halt";
+ apszArgs[iArg++] = "-h";
+ apszArgs[iArg++] = "-H";
break;
case RTSYSTEM_SHUTDOWN_REBOOT:
- apszArgs[iArg++] = "--reboot";
+ apszArgs[iArg++] = "-r";
break;
case RTSYSTEM_SHUTDOWN_POWER_OFF:
case RTSYSTEM_SHUTDOWN_POWER_OFF_HALT:
- apszArgs[iArg++] = "--poweroff";
+ apszArgs[iArg++] = "-h";
+ apszArgs[iArg++] = "-P";
break;
}
@@ -95,4 +99,3 @@ RTDECL(int) RTSystemShutdown(RTMSINTERVAL cMsDelay, uint32_t fFlags, const char
}
RT_EXPORT_SYMBOL(RTSystemShutdown);
-