Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-04-06 20:50:05 +0400
committerDenys Vlasenko <vda.linux@googlemail.com>2010-04-06 20:50:05 +0400
commitf8d8aa1cea915ce115345e6e729eddc80e86f021 (patch)
treeabceef94710d221816cf56343b7cadf10de50e5c /loginutils/login.c
parent87fb72032e6aa6abe5ac8fb05d22f43e8dde557b (diff)
libbb: add skip_dev_pfx()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils/login.c')
-rw-r--r--loginutils/login.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index bf21d6121..078cd68ed 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -249,9 +249,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
full_tty = xmalloc_ttyname(STDIN_FILENO);
if (!full_tty)
full_tty = xstrdup("UNKNOWN");
- short_tty = full_tty;
- if (strncmp(full_tty, "/dev/", 5) == 0)
- short_tty += 5;
+ short_tty = skip_dev_pfx(full_tty);
if (opt_host) {
fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host);