Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185739
b: refs/heads/master
c: 2bd3a99
h: refs/heads/master
i:
  185737: 27f24cc
  185735: b39ed1e
v: v3
  • Loading branch information
Eric W. Biederman authored and Al Viro committed Mar 3, 2010
1 parent f3bc1ee commit ccfc5fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2329e392accdb1b277927e8d9cbf568ba3f3856d
refs/heads/master: 2bd3a997befc226ab4b504f05c5cbba305f3e0e6
4 changes: 0 additions & 4 deletions trunk/init/do_mounts_initrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ static int __init do_linuxrc(void * shell)
extern char * envp_init[];

sys_close(old_fd);sys_close(root_fd);
sys_close(0);sys_close(1);sys_close(2);
sys_setsid();
(void) sys_open("/dev/console",O_RDWR,0);
(void) sys_dup(0);
(void) sys_dup(0);
return kernel_execve(shell, argv, envp_init);
}

Expand Down
11 changes: 6 additions & 5 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,6 @@ static noinline int init_post(void)
system_state = SYSTEM_RUNNING;
numa_default_policy();

if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
printk(KERN_WARNING "Warning: unable to open an initial console.\n");

(void) sys_dup(0);
(void) sys_dup(0);

current->signal->flags |= SIGNAL_UNKILLABLE;

Expand Down Expand Up @@ -873,6 +868,12 @@ static int __init kernel_init(void * unused)

do_basic_setup();

/* Open the /dev/console on the rootfs, this should never fail */
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
printk(KERN_WARNING "Warning: unable to open an initial console.\n");

(void) sys_dup(0);
(void) sys_dup(0);
/*
* check if there is an early userspace init. If yes, let it do all
* the work
Expand Down

0 comments on commit ccfc5fe

Please sign in to comment.