aboutsummaryrefslogtreecommitdiff
path: root/toys/other/switch_root.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-11-02 20:07:02 -0500
committerRob Landley <rob@landley.net>2018-11-02 20:07:02 -0500
commit6a73e13d75d31da2c3f1145d8487725f0073a4b8 (patch)
tree17b5bb8b6b5e94b1c93818954cf322a39941a4be /toys/other/switch_root.c
parent49e1d8733ebcaf130623c68a2393a3c43702a524 (diff)
downloadtoybox-6a73e13d75d31da2c3f1145d8487725f0073a4b8.tar.gz
Convert more option vars to the new (single letter) coding style.
Diffstat (limited to 'toys/other/switch_root.c')
-rw-r--r--toys/other/switch_root.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/toys/other/switch_root.c b/toys/other/switch_root.c
index acbae2bb..eb1e2b0c 100644
--- a/toys/other/switch_root.c
+++ b/toys/other/switch_root.c
@@ -22,7 +22,7 @@ config SWITCH_ROOT
#include <sys/vfs.h>
GLOBALS(
- char *console;
+ char *c;
dev_t rootdev;
)
@@ -78,8 +78,8 @@ void switch_root_main(void)
goto panic;
}
- if (TT.console && -1 == (console = open(TT.console, O_RDWR))) {
- perror_msg("bad console '%s'", TT.console);
+ if (TT.c && -1 == (console = open(TT.c, O_RDWR))) {
+ perror_msg("bad console '%s'", TT.c);
goto panic;
}
@@ -104,7 +104,7 @@ void switch_root_main(void)
goto panic;
}
- if (TT.console) {
+ if (TT.c) {
int i;
for (i=0; i<3; i++) if (console != i) dup2(console, i);
if (console>2) close(console);