diff options
Diffstat (limited to 'util-linux/rtcwake.c')
-rw-r--r-- | util-linux/rtcwake.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index 33cdbfad4..8aee0cfcb 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
@@ -32,18 +32,18 @@ | |||
32 | //usage: "\n -l,--local Clock is set to local time" | 32 | //usage: "\n -l,--local Clock is set to local time" |
33 | //usage: "\n -u,--utc Clock is set to UTC time" | 33 | //usage: "\n -u,--utc Clock is set to UTC time" |
34 | //usage: "\n -d,--device=DEV Specify the RTC device" | 34 | //usage: "\n -d,--device=DEV Specify the RTC device" |
35 | //usage: "\n -m,--mode=MODE Set the sleep state (default: standby)" | 35 | //usage: "\n -m,--mode=MODE Set sleep state (default: standby)" |
36 | //usage: "\n -s,--seconds=SEC Set the timeout in SEC seconds from now" | 36 | //usage: "\n -s,--seconds=SEC Set timeout in SEC seconds from now" |
37 | //usage: "\n -t,--time=TIME Set the timeout to TIME seconds from epoch" | 37 | //usage: "\n -t,--time=TIME Set timeout to TIME seconds from epoch" |
38 | //usage: ) | 38 | //usage: ) |
39 | //usage: IF_NOT_LONG_OPTS( | 39 | //usage: IF_NOT_LONG_OPTS( |
40 | //usage: "\n -a Read clock mode from adjtime" | 40 | //usage: "\n -a Read clock mode from adjtime" |
41 | //usage: "\n -l Clock is set to local time" | 41 | //usage: "\n -l Clock is set to local time" |
42 | //usage: "\n -u Clock is set to UTC time" | 42 | //usage: "\n -u Clock is set to UTC time" |
43 | //usage: "\n -d DEV Specify the RTC device" | 43 | //usage: "\n -d DEV Specify the RTC device" |
44 | //usage: "\n -m MODE Set the sleep state (default: standby)" | 44 | //usage: "\n -m MODE Set sleep state (default: standby)" |
45 | //usage: "\n -s SEC Set the timeout in SEC seconds from now" | 45 | //usage: "\n -s SEC Set timeout in SEC seconds from now" |
46 | //usage: "\n -t TIME Set the timeout to TIME seconds from epoch" | 46 | //usage: "\n -t TIME Set timeout to TIME seconds from epoch" |
47 | //usage: ) | 47 | //usage: ) |
48 | 48 | ||
49 | #include "libbb.h" | 49 | #include "libbb.h" |
@@ -66,7 +66,7 @@ static NOINLINE bool may_wakeup(const char *rtcname) | |||
66 | return false; | 66 | return false; |
67 | 67 | ||
68 | /* wakeup events could be disabled or not supported */ | 68 | /* wakeup events could be disabled or not supported */ |
69 | return strncmp(buf, "enabled\n", 8) == 0; | 69 | return is_prefixed_with(buf, "enabled\n") != NULL; |
70 | } | 70 | } |
71 | 71 | ||
72 | static NOINLINE void setup_alarm(int fd, time_t *wakeup, time_t rtc_time) | 72 | static NOINLINE void setup_alarm(int fd, time_t *wakeup, time_t rtc_time) |