uadmin(2) uadmin(2)
NAME
uadmin - administrative functions
SYNOPSIS
#include <sys/uadmin.h>
int uadmin(int cmd, int fcn, void *mdep);
DESCRIPTION
uadmin() provides control for basic administrative functions. This
system call is tightly coupled to the system administrative procedures
and is not intended for general use. The argument mdep is provided for
machine-dependent use and is not defined here.
The following commands are available, and can be specified for cmd:
ASHUTDOWN 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 has
been shut down is specified by fcn. The functions are
generic; the hardware capabilities vary on specific
machines.
ADHALT Halt the processor and turn off the power.
ADBOOT Reboot the system, using /stand/unix.
ADIBOOT Interactive reboot; user is prompted for boot-
able program name.
AREBOOT The system stops immediately without any further pro-
cessing. The action to be taken next is specified by fcn
as above.
AREMOUNT The root file system is mounted again after having been
fixed. This should be used only during the startup pro-
cess.
ERRORS
The following error code description is function-specific. You will
find a general description in introprm2(2) or in errno(5).
uadmin() fails if any of the following apply:
EPERM The effective user ID is not that of superuser.
Page 1 Reliant UNIX 5.44 Printed 11/98
uadmin(2) uadmin(2)
RESULT
Upon successful completion, the value returned depends on cmd as fol-
lows:
ASHUTDOWN Never returns
AREBOOT Never returns
AREMOUNT 0
Otherwise, a value of -1 is returned and errno is set to indicate the
error.
Page 2 Reliant UNIX 5.44 Printed 11/98