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 /util-linux | |
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 'util-linux')
-rw-r--r-- | util-linux/rtcwake.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index 66b08e343..b16376655 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
@@ -35,9 +35,8 @@ static NOINLINE bool may_wakeup(const char *rtcname) | |||
35 | ssize_t ret; | 35 | ssize_t ret; |
36 | char buf[128]; | 36 | char buf[128]; |
37 | 37 | ||
38 | /* strip the '/dev/' from the rtcname here */ | 38 | /* strip "/dev/" from the rtcname here */ |
39 | if (!strncmp(rtcname, "/dev/", 5)) | 39 | rtcname = skip_dev_pfx(rtcname); |
40 | rtcname += 5; | ||
41 | 40 | ||
42 | snprintf(buf, sizeof(buf), SYS_RTC_PATH, rtcname); | 41 | snprintf(buf, sizeof(buf), SYS_RTC_PATH, rtcname); |
43 | ret = open_read_close(buf, buf, sizeof(buf)); | 42 | ret = open_read_close(buf, buf, sizeof(buf)); |