libbb: add skip_dev_pfx()

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-04-06 18:50:05 +02:00
parent 87fb72032e
commit f8d8aa1cea
7 changed files with 17 additions and 21 deletions

View File

@@ -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])