uadmin(2) CLIX uadmin(2)
NAME
uadmin - Administrative control
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <sys/uadmin.h>
int uadmin(
int cmd ,
int fcn ,
int mdep );
PARAMETERS
cmd Specifies the command requested.
fcn Specifies the action taken after shutdown.
mdep For machine dependent use (currently unused by all commands).
DESCRIPTION
The uadmin() function provides control for basic administrative functions.
This function is tightly coupled to the system administrative procedures
and is not intended for general use. The mdep parameter is provided for
machine-dependent use and is currently undefined.
The following commands are available, as specified by cmd:
A_SHUTDOWN
Shutdown the system. All user processes are killed, the buffer
cache is flushed, and the root file system is unmounted. The
action to be taken after the system has been shutdown is specified
by fcn. The functions are generic; the hardware capabilities vary
on specific machines.
AD_HALT Halt the processor and turn off the power.
AD_BOOT Reboot the system, using /unix.
AD_IBOOT Reboot interactively. The user is prompted for the
system name.
A_REBOOT
Stop the system immediately without any further processing. The
action to be taken next is specified by fcn as above.
2/94 - Intergraph Corporation 1
uadmin(2) CLIX uadmin(2)
A_REMOUNT
Mount the root file system again after it has been fixed. This
should be used only during the startup process.
EXAMPLES
To halt and reboot the system:
uadmin(A_SHUTDOWN, AD_BOOT, 0);
RETURN VALUES
Upon successful completion, the value returned depends on cmd as follows:
A_SHUTDOWN Never returns.
A_REBOOT Never returns.
A_REMOUNT 0
Otherwise, a value of -1 is returned and errno is set to indicate the
error.
ERRORS
The uadmin() function fails if the following is true:
[EPERM] The effective user ID is not superuser.
RELATED INFORMATION
Commands: init(8)
2 Intergraph Corporation - 2/94