VirtualBox

Changeset 39727 in vbox for trunk


Ignore:
Timestamp:
Jan 8, 2012 4:51:52 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
75587
Message:

VINF_SYS_MAY_POWER_OFF

Location:
trunk
Files:
3 edited

Legend:

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

    r39724 r39727  
    16891689/** Power off is not supported by the hardware or the OS. */
    16901690#define VERR_SYS_CANNOT_POWER_OFF                   (-22400)
     1691/** The halt action was requested, but the OS may actually power
     1692 * off the machine. */
     1693#define VINF_SYS_MAY_POWER_OFF                      (22401)
    16911694/** Shutdown failed. */
    1692 #define VERR_SYS_SHUTDOWN_FAILED                    (-22401)
     1695#define VERR_SYS_SHUTDOWN_FAILED                    (-22402)
    16931696/** @} */
    16941697
  • TabularUnified trunk/include/iprt/system.h

    r39721 r39727  
    199199/** Reboot the system after shutdown. */
    200200#define RTSYSTEM_SHUTDOWN_REBOOT            UINT32_C(0)
    201 /** Reboot the system after shutdown. */
     201/** Reboot the system after shutdown.
     202 * The call may return VINF_SYS_MAY_POWER_OFF if the OS /
     203 * hardware combination may power off instead of halting. */
    202204#define RTSYSTEM_SHUTDOWN_HALT              UINT32_C(1)
    203205/** Power off the system after shutdown.
     
    227229 * @returns IPRT status code on failure, on success it may or may not return
    228230 *          depending on the OS.
     231 * @retval  VINF_SUCCESS
     232 * @retval  VINF_SYS_MAY_POWER_OFF
     233 * @retval  VERR_SYS_SHUTDOWN_FAILED
     234 * @retval  VERR_SYS_CANNOT_POWER_OFF
     235 * 
    229236 * @param   cMsDelay            The delay before the actual reboot.  If this is
    230237 *                              not supported by the OS, an immediate reboot
  • TabularUnified trunk/src/VBox/Runtime/r3/win/RTSystemShutdown-win.cpp

    r39726 r39727  
    5757                                fForceAppsClosed,
    5858                                fRebootAfterShutdown))
    59         return VINF_SUCCESS;
     59        return (fFlags & RTSYSTEM_SHUTDOWN_ACTION_MASK) == RTSYSTEM_SHUTDOWN_HALT ? VINF_SYS_MAY_POWER_OFF : VINF_SUCCESS;
    6060    return RTErrConvertFromWin32(GetLastError());
    6161}
Note: See TracChangeset for help on using the changeset viewer.

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