summaryrefslogtreecommitdiff
path: root/libbb/skip_whitespace.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 /libbb/skip_whitespace.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 'libbb/skip_whitespace.c')
-rw-r--r--libbb/skip_whitespace.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libbb/skip_whitespace.c b/libbb/skip_whitespace.c
index 7b12326..f5a61a3 100644
--- a/libbb/skip_whitespace.c
+++ b/libbb/skip_whitespace.c
@@ -30,3 +30,10 @@ char* FAST_FUNC skip_non_whitespace(const char *s)
return (char *) s;
}
+
+char* FAST_FUNC skip_dev_pfx(const char *tty_name)
+{
+ if (strncmp(tty_name, "/dev/", 5) == 0)
+ tty_name += 5;
+ return (char*)tty_name;
+}