summaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-04-06 18:50:05 +0200
committerDenys Vlasenko2010-04-06 18:50:05 +0200
commitf8d8aa1cea915ce115345e6e729eddc80e86f021 (patch)
treeabceef94710d221816cf56343b7cadf10de50e5c /init/init.c
parent87fb72032e6aa6abe5ac8fb05d22f43e8dde557b (diff)
downloadbusybox-f8d8aa1cea915ce115345e6e729eddc80e86f021.zip
busybox-f8d8aa1cea915ce115345e6e729eddc80e86f021.tar.gz
libbb: add skip_dev_pfx()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/init/init.c b/init/init.c
index 481f551..2eb8f1a 100644
--- a/init/init.c
+++ b/init/init.c
@@ -568,9 +568,7 @@ static void parse_inittab(void)
goto bad_entry;
/* turn .*TTY -> /dev/TTY */
if (tty[0]) {
- if (strncmp(tty, "/dev/", 5) == 0)
- tty += 5;
- tty = concat_path_file("/dev/", tty);
+ tty = concat_path_file("/dev/", skip_dev_pfx(tty));
}
new_init_action(1 << action, token[3], tty);
if (tty[0])