summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
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);
-