summaryrefslogtreecommitdiff
path: root/loginutils/login.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-04-06 18:50:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-04-06 18:50:05 +0200
commitf8d8aa1cea915ce115345e6e729eddc80e86f021 (patch)
treeabceef94710d221816cf56343b7cadf10de50e5c /loginutils/login.c
parent87fb72032e6aa6abe5ac8fb05d22f43e8dde557b (diff)
downloadbusybox-w32-f8d8aa1cea915ce115345e6e729eddc80e86f021.tar.gz
busybox-w32-f8d8aa1cea915ce115345e6e729eddc80e86f021.tar.bz2
busybox-w32-f8d8aa1cea915ce115345e6e729eddc80e86f021.zip
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)
249 full_tty = xmalloc_ttyname(STDIN_FILENO); 249 full_tty = xmalloc_ttyname(STDIN_FILENO);
250 if (!full_tty) 250 if (!full_tty)
251 full_tty = xstrdup("UNKNOWN"); 251 full_tty = xstrdup("UNKNOWN");
252 short_tty = full_tty; 252 short_tty = skip_dev_pfx(full_tty);
253 if (strncmp(full_tty, "/dev/", 5) == 0)
254 short_tty += 5;
255 253
256 if (opt_host) { 254 if (opt_host) {
257 fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host); 255 fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host);