static int init(void * unused) { lock_kernel(); do_basic_setup();
prepare_namespace();
/* * Ok, we have completed the initial bootup, and * we're essentially up and running. Get rid of the * initmem segments and start the user-mode stuff.. */ free_initmem(); unlock_kernel();
if (open("/dev/console", O_RDWR, 0) < 0) printk("Warning: unable to open an initial console.\n");
(void) dup(0); (void) dup(0);
/* * We try each of these until one succeeds. * * The Bourne shell can be used instead of init if we are * trying to recover a really broken machine. */