summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock-rtc.c
diff options
context:
space:
mode:
authorJ William Piggott2017-12-24 21:37:36 +0100
committerKarel Zak2018-01-17 13:29:11 +0100
commitde4568f7574fc529eea3ba9a49bb706ffbbd201c (patch)
tree2fdd562ba5c57d7eafa495146908f7fc0381f37d /sys-utils/hwclock-rtc.c
parentcal: update man page (diff)
downloadkernel-qcow2-util-linux-de4568f7574fc529eea3ba9a49bb706ffbbd201c.tar.gz
kernel-qcow2-util-linux-de4568f7574fc529eea3ba9a49bb706ffbbd201c.tar.xz
kernel-qcow2-util-linux-de4568f7574fc529eea3ba9a49bb706ffbbd201c.zip
hwclock: rename --debug option to --verbose
Warn on --debug; do not fallthrough because the message is lost in the verbose output. Coauthored-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock-rtc.c')
-rw-r--r--sys-utils/hwclock-rtc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c
index cdd7d80d6..ef95d9807 100644
--- a/sys-utils/hwclock-rtc.c
+++ b/sys-utils/hwclock-rtc.c
@@ -124,7 +124,7 @@ static int open_rtc(const struct hwclock_control *ctl)
rtc_dev_fd = open(rtc_dev_name, O_RDONLY);
} else {
for (i = 0; i < ARRAY_SIZE(fls); i++) {
- if (ctl->debug)
+ if (ctl->verbose)
printf(_("Trying to open: %s\n"), fls[i]);
rtc_dev_fd = open(fls[i], O_RDONLY);
@@ -208,7 +208,7 @@ static int busywait_for_rtc_clock_tick(const struct hwclock_control *ctl,
int rc;
struct timeval begin, now;
- if (ctl->debug) {
+ if (ctl->verbose) {
printf("ioctl(%d, RTC_UIE_ON, 0): %s\n",
rtc_fd, strerror(errno));
printf(_("Waiting in loop for time from %s to change\n"),
@@ -358,7 +358,7 @@ static int set_hardware_clock_rtc(const struct hwclock_control *ctl,
hwclock_exit(ctl, EXIT_FAILURE);
}
- if (ctl->debug)
+ if (ctl->verbose)
printf(_("ioctl(%s) was successful.\n"), ioctlname);
return 0;
@@ -407,7 +407,7 @@ int get_epoch_rtc(const struct hwclock_control *ctl, unsigned long *epoch_p)
return 1;
}
- if (ctl->debug)
+ if (ctl->verbose)
printf(_("ioctl(%d, RTC_EPOCH_READ, epoch_p) to %s succeeded.\n"),
rtc_fd, rtc_dev_name);
@@ -442,7 +442,7 @@ int set_epoch_rtc(const struct hwclock_control *ctl)
return 1;
}
- if (ctl->debug)
+ if (ctl->verbose)
printf(_("ioctl(%d, RTC_EPOCH_SET, %lu) to %s succeeded.\n"),
rtc_fd, epoch, rtc_dev_name);