DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

drv_shutdown(D3)


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);

Description

drv_shutdown is used to initiate a specified type of system shutdown from a driver.

Arguments


sd_rqt
Type of shutdown request. Valid values are:

SD_SOFT
Initiate a soft, graceful reboot. This is equivalent to typing the shutdown command.

SD_HARD
Initiate a hard, immediate reboot, bypassing shutdown scripts. This is equivalent to using the uadmin command or uadmin system call.

SD_PANIC
Initiate a user-requested panic.

option
Option qualifier for particular requests.

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 (see boot(4)) without user intervention.

option values for SD_PANIC:


AD_QUERY
Interactive panic. Query the user before panicking the system.

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.

Context and synchronization

Non-blockable, interrupt, user, or blockable context.

Hardware applicability

All

Version applicability

ddi: 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

References

drv_callback(D3), shutdown, uadmin, uadmin
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005