VirtualBox

Changeset 39721 in vbox


Ignore:
Timestamp:
Jan 7, 2012 9:36:46 PM (13 years ago)
Author:
vboxsync
Message:

RTSystemShutdown: stub.

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/err.h

    r39690 r39721  
    16851685/** @} */
    16861686
     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
    16871693/* SED-END */
    16881694
  • trunk/include/iprt/system.h

    r33540 r39721  
    195195RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t cbBuf);
    196196
     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)
    197222/** @} */
    198223
     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 */
     236RTDECL(int) RTSystemShutdown(RTMSINTERVAL cMsDelay, uint32_t fFlags, const char *pszLogMsg);
     237
     238/** @} */
     239
    199240RT_C_DECLS_END
    200241
  • trunk/src/VBox/Runtime/Makefile.kmk

    r39627 r39721  
    541541        generic/RTProcDaemonize-generic.cpp \
    542542        generic/RTProcIsRunningByName-generic.cpp \
     543        generic/RTSystemShutdown-generic.cpp \
    543544        generic/RTThreadGetNativeState-generic.cpp \
    544545        nt/RTErrConvertFromNtStatus.cpp \
     
    590591        generic/RTSemEventMultiWait-2-ex-generic.cpp \
    591592        generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
     593        generic/RTSystemShutdown-generic.cpp \
    592594        generic/RTTimeLocalNow-generic.cpp \
    593595        generic/RTTimerCreate-generic.cpp \
     
    673675        generic/RTRandAdvCreateSystemTruer-generic.cpp \
    674676        generic/RTSystemQueryDmiString-generic.cpp \
     677        generic/RTSystemShutdown-generic.cpp \
    675678        generic/RTTimeLocalNow-generic.cpp \
    676679        generic/RTTimerCreate-generic.cpp \
     
    747750        generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
    748751        generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
     752        generic/RTSystemShutdown-generic.cpp \
    749753        generic/timer-generic.cpp \
    750754        generic/utf16locale-generic.cpp \
     
    803807        generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
    804808        generic/RTSystemQueryDmiString-generic.cpp \
     809        generic/RTSystemShutdown-generic.cpp \
    805810        generic/RTThreadGetAffinity-stub-generic.cpp \
    806811        generic/RTThreadSetAffinity-stub-generic.cpp \
     
    869874        generic/RTSemEventMultiWait-2-ex-generic.cpp \
    870875        generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
     876        generic/RTSystemShutdown-generic.cpp \
    871877        generic/RTThreadSetAffinityToCpu-generic.cpp \
    872878        generic/RTTimeLocalNow-generic.cpp \
     
    957963        generic/RTSystemQueryOSInfo-generic.cpp \
    958964        generic/RTSystemQueryDmiString-generic.cpp \
     965        generic/RTSystemShutdown-generic.cpp \
    959966        generic/RTThreadGetAffinity-stub-generic.cpp \
    960967        generic/RTThreadSetAffinity-stub-generic.cpp \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette