Changeset 39721 in vbox
- Timestamp:
- Jan 7, 2012 9:36:46 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
-
include/iprt/err.h (modified) (1 diff)
-
include/iprt/system.h (modified) (1 diff)
-
src/VBox/Runtime/Makefile.kmk (modified) (7 diffs)
-
src/VBox/Runtime/generic/RTSystemShutdown-generic.cpp (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/err.h
r39690 r39721 1685 1685 /** @} */ 1686 1686 1687 /** @name Logger status codes 1688 * @{ */ 1689 /** Power off is not supported by the hardware or the OS. */ 1690 #define VERR_SYS_CANNOT_POWER_OFF (-22400) 1691 /** @} */ 1692 1687 1693 /* SED-END */ 1688 1694 -
trunk/include/iprt/system.h
r33540 r39721 195 195 RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t cbBuf); 196 196 197 /** @name Flags for RTSystemReboot and RTSystemShutdown. 198 * @{ */ 199 /** Reboot the system after shutdown. */ 200 #define RTSYSTEM_SHUTDOWN_REBOOT UINT32_C(0) 201 /** Reboot the system after shutdown. */ 202 #define RTSYSTEM_SHUTDOWN_HALT UINT32_C(1) 203 /** Power off the system after shutdown. 204 * This may be equvivalent to a RTSYSTEM_SHUTDOWN_HALT on systems where we 205 * cannot figure out whether the hardware/OS implements the actual powering 206 * off. If we can figure out that it's not supported, an 207 * VERR_SYS_CANNOT_POWER_OFF error is raised. */ 208 #define RTSYSTEM_SHUTDOWN_POWER_OFF UINT32_C(2) 209 /** Power off the system after shutdown, or halt it if that's not possible. */ 210 #define RTSYSTEM_SHUTDOWN_POWER_OFF_HALT UINT32_C(3) 211 /** The shutdown action mask. */ 212 #define RTSYSTEM_SHUTDOWN_ACTION_MASK UINT32_C(3) 213 /** Unplanned shutdown/reboot. */ 214 #define RTSYSTEM_SHUTDOWN_UNPLANNED UINT32_C(0) 215 /** Planned shutdown/reboot. */ 216 #define RTSYSTEM_SHUTDOWN_PLANNED RT_BIT_32(2) 217 /** Force the system to shutdown/reboot regardless of objecting application 218 * or other stuff. This flag might not be realized on all systems. */ 219 #define RTSYSTEM_SHUTDOWN_FORCE RT_BIT_32(3) 220 /** Parameter validation mask. */ 221 #define RTSYSTEM_SHUTDOWN_VALID_MASK UINT32_C(0x0000000f) 197 222 /** @} */ 198 223 224 /** 225 * Shuts down the system. 226 * 227 * @returns IPRT status code on failure, on success it may or may not return 228 * depending on the OS. 229 * @param cMsDelay The delay before the actual reboot. If this is 230 * not supported by the OS, an immediate reboot 231 * will be performed. 232 * @param fFlags Shutdown flags, see RTSYSTEM_SHUTDOWN_XXX. 233 * @param pszLogMsg Message for the log and users about why we're 234 * shutting down. 235 */ 236 RTDECL(int) RTSystemShutdown(RTMSINTERVAL cMsDelay, uint32_t fFlags, const char *pszLogMsg); 237 238 /** @} */ 239 199 240 RT_C_DECLS_END 200 241 -
trunk/src/VBox/Runtime/Makefile.kmk
r39627 r39721 541 541 generic/RTProcDaemonize-generic.cpp \ 542 542 generic/RTProcIsRunningByName-generic.cpp \ 543 generic/RTSystemShutdown-generic.cpp \ 543 544 generic/RTThreadGetNativeState-generic.cpp \ 544 545 nt/RTErrConvertFromNtStatus.cpp \ … … 590 591 generic/RTSemEventMultiWait-2-ex-generic.cpp \ 591 592 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \ 593 generic/RTSystemShutdown-generic.cpp \ 592 594 generic/RTTimeLocalNow-generic.cpp \ 593 595 generic/RTTimerCreate-generic.cpp \ … … 673 675 generic/RTRandAdvCreateSystemTruer-generic.cpp \ 674 676 generic/RTSystemQueryDmiString-generic.cpp \ 677 generic/RTSystemShutdown-generic.cpp \ 675 678 generic/RTTimeLocalNow-generic.cpp \ 676 679 generic/RTTimerCreate-generic.cpp \ … … 747 750 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \ 748 751 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \ 752 generic/RTSystemShutdown-generic.cpp \ 749 753 generic/timer-generic.cpp \ 750 754 generic/utf16locale-generic.cpp \ … … 803 807 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \ 804 808 generic/RTSystemQueryDmiString-generic.cpp \ 809 generic/RTSystemShutdown-generic.cpp \ 805 810 generic/RTThreadGetAffinity-stub-generic.cpp \ 806 811 generic/RTThreadSetAffinity-stub-generic.cpp \ … … 869 874 generic/RTSemEventMultiWait-2-ex-generic.cpp \ 870 875 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \ 876 generic/RTSystemShutdown-generic.cpp \ 871 877 generic/RTThreadSetAffinityToCpu-generic.cpp \ 872 878 generic/RTTimeLocalNow-generic.cpp \ … … 957 963 generic/RTSystemQueryOSInfo-generic.cpp \ 958 964 generic/RTSystemQueryDmiString-generic.cpp \ 965 generic/RTSystemShutdown-generic.cpp \ 959 966 generic/RTThreadGetAffinity-stub-generic.cpp \ 960 967 generic/RTThreadSetAffinity-stub-generic.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.

