From f8d8aa1cea915ce115345e6e729eddc80e86f021 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 6 Apr 2010 18:50:05 +0200 Subject: libbb: add skip_dev_pfx() Signed-off-by: Denys Vlasenko --- init/init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'init') diff --git a/init/init.c b/init/init.c index 481f55167..2eb8f1a54 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]) -- cgit v1.2.3