UADMIN(2) INTERACTIVE UNIX System UADMIN(2)
NAME
uadmin - administrative control
SYNOPSIS
#include <sys/uadmin.h>
int uadmin (cmd, fcn, mdep)
int cmd, fcn, mdep;
DESCRIPTION
The uadmin system call provides control for basic adminis-
trative 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.
As specified by cmd, the following commands are available:
A_SHUTDOWN The system is shutdown. 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.
AD_HALT Halt the processor.
AD_BOOT Interactive reboot; user is
prompted for system name.
AD_IBOOT Interactive reboot; user is
prompted 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 root file system is mounted again after
having been fixed. This should be used only
during the startup process.
A_SETCONFIG Sets the system configuration. Currently,
only the following function is available:
AD_PANICBOOT If mdep is 1, this function
causes the machine to reboot
automatically after a kernel
panic. If mdep is 0, this
function causes the machine
to wait for user intervention
at the console before reboot-
ing after a kernel panic.
Rev. C Software Development Set Page 1
UADMIN(2) INTERACTIVE UNIX System UADMIN(2)
The uadmin system call fails if any of the following is
true:
[EPERM] The effective user ID is not super-user.
DIAGNOSTICS
Upon successful completion, the value returned depends on
cmd as follows:
A_SHUTDOWN No return value.
A_REBOOT No return value.
A_REMOUNT 0
A_SETCONFIG 0
Otherwise, a value of -1 is returned, and errno is set to
indicate the error.
Rev. C Software Development Set Page 2