diff options
Diffstat (limited to 'util-linux/switch_root.c')
| -rw-r--r-- | util-linux/switch_root.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index f2d9b6e69..45290c942 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
| @@ -111,12 +111,12 @@ int switch_root_main(int argc, char *argv[]) | |||
| 111 | if (console) { | 111 | if (console) { |
| 112 | close(0); | 112 | close(0); |
| 113 | if(open(console, O_RDWR) < 0) | 113 | if(open(console, O_RDWR) < 0) |
| 114 | bb_error_msg_and_die("Bad console '%s'",console); | 114 | bb_error_msg_and_die("bad console '%s'",console); |
| 115 | dup2(0, 1); | 115 | dup2(0, 1); |
| 116 | dup2(0, 2); | 116 | dup2(0, 2); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | // Exec real init. (This is why we must be pid 1.) | 119 | // Exec real init. (This is why we must be pid 1.) |
| 120 | execv(argv[optind],argv+optind); | 120 | execv(argv[optind],argv+optind); |
| 121 | bb_error_msg_and_die("Bad init '%s'",argv[optind]); | 121 | bb_error_msg_and_die("bad init '%s'",argv[optind]); |
| 122 | } | 122 | } |
