drv_shutdown(D3) drv_shutdown(D3)
NAME
drv_shutdown - initiate a system shutdown
SYNOPSIS
#include <sys/uadmin.h>
#include <sys/ddi.h>
void drv_shutdown(shutdown_request_t sd_rqt, int option);
Arguments
sd_rqt Type of shutdown request.
option Option qualifier for particular requests.
DESCRIPTION
drv_shutdown is used to initiate a system shutdown from a
driver. There are various types of shutdowns which can be
requested, as specified by sd_rqt. These are:
SD_SOFT Initiate a soft, graceful reboot. This is
equivalent to typing the shutdown(1M) command.
SD_HARD Initiate a hard, immediate reboot, bypassing
shutdown scripts. This is equivalent to using the
uadmin(1M) command or uadmin(2) system call.
SD_PANIC Initiate a user-requested panic.
option values for SD_SOFT and SD_HARD:
AD_HALT After shutting down, halt the processor and turn off
the power, if possible.
AD_IBOOT After shutting down, reboot interactively. That is,
come up in ``firmware'' mode to an interactive boot
prompt, if possible.
AD_BOOT After shutting down, reboot the default kernel
(typically /stand/unix) without user intervention.
option values for SD_PANIC:
AD_QUERY Interactive panic. Ask the user whether or not they
real want to panic the system.
Copyright 1994 Novell, Inc. Page 1
drv_shutdown(D3) drv_shutdown(D3)
AD_NOQUERY
Unconditional panic.
Return Values
None.
USAGE
drv_shutdown is typically used by console drivers to handle
user-initiated shutdown and panic requests, or by system
condition monitors to attempt graceful system shutdown when
serious conditions (for example, excessive heat) have been
detected.
Level
Base or Interrupt.
Synchronization Constraints
Can sleep.
Driver-defined basic locks, read/write locks, and sleep
locks may not be held across calls to this function.
REFERENCES
shutdown(1M), uadmin(1M), uadmin(2), drv_callback(D3)
NOTICES
Portability
All processors.
Applicability
ddi: 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2