]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
rtcwake: don't use usage() on error
authorKarel Zak <kzak@redhat.com>
Mon, 29 Jun 2015 11:43:41 +0000 (13:43 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Jun 2015 11:43:41 +0000 (13:43 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/rtcwake.c

index a53ed48f9e7fe4a14e8b5f575167d7ed64129c5e..e137d8436e8a577ae9b736a7fd4704de7f92cc59 100644 (file)
@@ -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))