RTSystemShutdown-solaris.cpp revision 176e5972d88cf5575c6854860310aff1f3ddfab6
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * IPRT - RTSystemShutdown, linux implementation.
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * Copyright (C) 2012 Oracle Corporation
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * available from http://www.virtualbox.org. This file is free software;
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * you can redistribute it and/or modify it under the terms of the GNU
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * General Public License (GPL) as published by the Free Software
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * The contents of this file may alternatively be used under the terms
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * of the Common Development and Distribution License Version 1.0
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * VirtualBox OSE distribution, in which case the provisions of the
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * CDDL are applicable instead of those of the GPL.
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * You may elect to license modified versions of this file under the
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * terms and conditions of either the GPL or the CDDL or both.
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync/*******************************************************************************
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync* Header Files *
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync*******************************************************************************/
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsyncRTDECL(int) RTSystemShutdown(RTMSINTERVAL cMsDelay, uint32_t fFlags, const char *pszLogMsg)
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync AssertReturn(!(fFlags & ~RTSYSTEM_SHUTDOWN_VALID_MASK), VERR_INVALID_PARAMETER);
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync * Assemble the argument vector.
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync apszArgs[iArg++] = "-y"; /* Pre-answer confirmation question. */
3f8d7e373b73cca71b1889377a3eea5d3362a01bvboxsync apszArgs[iArg++] = "-i"; /* Change to the following state. */
case RTSYSTEM_SHUTDOWN_HALT:
case RTSYSTEM_SHUTDOWN_REBOOT:
return rc;
return rc;