UADMIN(S) UNIX System V UADMIN(S)
Name
uadmin - administrative control for rebooting the system and
remounting the root filesystem"
Syntax
#include <sys/uadmin.h>
int uadmin (cmd, fcn, mdep)
int cmd, fcn;
char *mdep;
Description
The uadmin call provides control for two basic system
functions: rebooting the system and remounting the root
filesystem. This system call is tightly coupled to the
system administrative procedures and is not intended for
general use.
The commands available as specified by cmd are:
A_SHUTDOWN
The system is shut down. 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 is shut down is specified by fcn. If mdep is
non-null, then it points to a superblock to be written
to the disk.
Values of fcn for this cmd are:
AD_HALT Halt the processor.
AD_BOOT Reboot the system.
AD_IBOOT Interactive reboot, prompt for system
name.
A_REBOOT
The system stops immediately without any further
processing. The action to be taken next is specified
by fcn as above.
A_REMOUNT
The buffer cache is invalidated and the superblock is
read in again. This should only be used during the
startup process.
A_SETCONFIG
Some internal systemwide kernel state as specified by
fcn is set to a value as specified by mdep.
Value of fcn for this cmd is:
AD_BOOTPANIC If mdep is 1, system
panics cause the
system to reboot. If
mdep is 0, the system
waits for a keystroke.
See Also
haltsys(ADM), shutdown(ADM)
Diagnostics
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.
uadmin fails if the effective user ID is not super-user
[EPERM].
Notes
AD_BOOT and AD_IBOOT do the same thing.
(printed 6/20/89)