- Add the global 'rebooting' variable that is used to detect when
boot() has been called. Sponsored by: Isilon Systems, Inc. MFC After: 1 week
This commit is contained in:
parent
c4be19469a
commit
36a52c3cae
@ -111,6 +111,7 @@ SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, "Shutdown environment");
|
||||
const char *panicstr;
|
||||
|
||||
int dumping; /* system is dumping */
|
||||
int rebooting; /* system is rebooting */
|
||||
static struct dumperinfo dumper; /* our selected dumper */
|
||||
|
||||
/* Context information for dump-debuggers. */
|
||||
@ -265,6 +266,8 @@ boot(int howto)
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
KASSERT(PCPU_GET(cpuid) == 0, ("boot: not running on cpu 0"));
|
||||
#endif
|
||||
/* We're in the process of rebooting. */
|
||||
rebooting = 1;
|
||||
|
||||
/* collect extra flags that shutdown_nice might have set */
|
||||
howto |= shutdown_howto;
|
||||
|
@ -49,6 +49,7 @@ extern int securelevel; /* system security level (see init(8)) */
|
||||
extern int suser_enabled; /* suser() is permitted to return 0 */
|
||||
|
||||
extern int cold; /* nonzero if we are doing a cold boot */
|
||||
extern int rebooting; /* boot() has been called. */
|
||||
extern const char *panicstr; /* panic message */
|
||||
extern char version[]; /* system version */
|
||||
extern char copyright[]; /* system copyright */
|
||||
|
Loading…
x
Reference in New Issue
Block a user