]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: restore select() timeout warning
authorJ William Piggott <elseifthen@gmx.com>
Mon, 31 Jul 2017 13:20:58 +0000 (09:20 -0400)
committerJ William Piggott <elseifthen@gmx.com>
Fri, 4 Aug 2017 12:53:45 +0000 (08:53 -0400)
hwclock now exits on select(2) timeout so restore the warning.

Reverts commit ab8f402952301106ad0bd5c5a51dc8646d1bff64
 and    commit efc4eaf4229f78f14430d8739ddef2c5101f05cc

Except use warnx(), because select() timeout does not set errno.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
sys-utils/hwclock-rtc.c

index c73807665365b6245e1e5ba96299da699b6b6565..a660e32bab5e8707cab02cba2bef3d1315e88e31 100644 (file)
@@ -288,9 +288,8 @@ static int synchronize_to_clock_tick_rtc(const struct hwclock_control *ctl)
                        if (0 < rc)
                                ret = 0;
                        else if (rc == 0) {
-                               if (ctl->debug)
-                                       printf(_("select() to %s to wait for clock tick timed out"),
-                                              rtc_dev_name);
+                               warnx(_("select() to %s to wait for clock tick timed out"),
+                                     rtc_dev_name);
                        } else
                                warn(_("select() to %s to wait for clock tick failed"),
                                     rtc_dev_name);