diff options
author | Andrew Morton <akpm@osdl.org> | 2004-04-11 22:40:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-11 22:40:05 -0700 |
commit | 0eb217f9b539fccf5aafaba8c9a06e170825f68b (patch) | |
tree | 6df0d2ff9cdb4f185c74650016ddf193105eb90c /init | |
parent | 243c64b2cfea7e49e074c80db65fa7b90d765c6f (diff) | |
download | history-0eb217f9b539fccf5aafaba8c9a06e170825f68b.tar.gz |
[PATCH] generalise system_running
From: Olof Johansson <olof@austin.ibm.com>
It's currently a boolean, but that means that system_running goes to zero
again when shutting down. So we then use code (in the page allocator) which
is only designed to be used during bootup - it is marked __init.
So we need to be able to distinguish early boot state from late shutdown
state. Rename system_running to system_state and give it the three
appropriate states.
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c index 9d1ed1de14c560..348ce7db30f329 100644 --- a/init/main.c +++ b/init/main.c @@ -94,11 +94,7 @@ extern void driver_init(void); extern void tc_init(void); #endif -/* - * Are we up and running (ie do we have all the infrastructure - * set up) - */ -int system_running; +int system_state; /* SYSTEM_BOOTING/RUNNING/SHUTDOWN */ /* * Boot command-line arguments @@ -613,7 +609,7 @@ static int init(void * unused) */ free_initmem(); unlock_kernel(); - system_running = 1; + system_state = SYSTEM_RUNNING; if (sys_open("/dev/console", O_RDWR, 0) < 0) printk("Warning: unable to open an initial console.\n"); |