diff options
author | Karel Zak | 2015-06-29 13:43:41 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-29 13:43:41 +0200 |
commit | 2626f123a5ca64fdd3574cba8bf9567d54163df2 (patch) | |
tree | f14584dcac354cd8e30ef988e52e2b53499f247c /sys-utils/rtcwake.c | |
parent | rtcwake: fix valgrind warning (diff) | |
download | kernel-qcow2-util-linux-2626f123a5ca64fdd3574cba8bf9567d54163df2.tar.gz kernel-qcow2-util-linux-2626f123a5ca64fdd3574cba8bf9567d54163df2.tar.xz kernel-qcow2-util-linux-2626f123a5ca64fdd3574cba8bf9567d54163df2.zip |
rtcwake: don't use usage() on error
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/rtcwake.c')
-rw-r--r-- | sys-utils/rtcwake.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c index a53ed48f9..e137d8436 100644 --- a/sys-utils/rtcwake.c +++ b/sys-utils/rtcwake.c @@ -498,10 +498,10 @@ int main(int argc, char **argv) if (ctl.verbose) printf("%s", ctl.clock_mode == CM_UTC ? _("Using UTC time.\n") : _("Using local time.\n")); - if (!alarm && !seconds && suspend != DISABLE_MODE && suspend != SHOW_MODE) { - warnx(_("must provide wake time (see --seconds, --time, and --date options)")); - usage(stderr); - } + + if (!alarm && !seconds && suspend != DISABLE_MODE && suspend != SHOW_MODE) + errx(EXIT_FAILURE, _("must provide wake time (see --seconds, --time and --date options)")); + /* device must exist and (if we'll sleep) be wakeup-enabled */ fd = open_dev_rtc(devname); if (suspend != ON_MODE && suspend != NO_MODE && !is_wakeup_enabled(devname)) |