diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-06 18:50:05 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-06 18:50:05 +0200 |
commit | f8d8aa1cea915ce115345e6e729eddc80e86f021 (patch) | |
tree | abceef94710d221816cf56343b7cadf10de50e5c /e2fsprogs/fsck.c | |
parent | 87fb72032e6aa6abe5ac8fb05d22f43e8dde557b (diff) | |
download | busybox-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 'e2fsprogs/fsck.c')
-rw-r--r-- | e2fsprogs/fsck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 0192f3cdb..7c449e3e7 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c | |||
@@ -169,12 +169,12 @@ static char *base_device(const char *device) | |||
169 | const char *disk; | 169 | const char *disk; |
170 | int len; | 170 | int len; |
171 | #endif | 171 | #endif |
172 | cp = str = xstrdup(device); | 172 | str = xstrdup(device); |
173 | 173 | ||
174 | /* Skip over /dev/; if it's not present, give up. */ | 174 | /* Skip over "/dev/"; if it's not present, give up */ |
175 | if (strncmp(cp, "/dev/", 5) != 0) | 175 | cp = skip_dev_pfx(str); |
176 | if (cp == str) | ||
176 | goto errout; | 177 | goto errout; |
177 | cp += 5; | ||
178 | 178 | ||
179 | /* | 179 | /* |
180 | * For md devices, we treat them all as if they were all | 180 | * For md devices, we treat them all as if they were all |