diff options
author | J William Piggott | 2017-07-23 20:25:55 +0200 |
---|---|---|
committer | J William Piggott | 2017-07-31 22:10:47 +0200 |
commit | cbc36f7903ca0d4ee399ad5865b5237af593bacb (patch) | |
tree | 119f3b5ef8d2a15532fbbd4721e7fa0b3c06232c /sys-utils/hwclock-rtc.c | |
parent | hwclock: squash custom errno strings (diff) | |
download | kernel-qcow2-util-linux-cbc36f7903ca0d4ee399ad5865b5237af593bacb.tar.gz kernel-qcow2-util-linux-cbc36f7903ca0d4ee399ad5865b5237af593bacb.tar.xz kernel-qcow2-util-linux-cbc36f7903ca0d4ee399ad5865b5237af593bacb.zip |
hwclock: squash custom errno strings
warn() appends ENOENT as: No such file or directory
The custom string is unnecessary and problematic for translators.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock-rtc.c')
-rw-r--r-- | sys-utils/hwclock-rtc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c index 2af2666d2..36ce39761 100644 --- a/sys-utils/hwclock-rtc.c +++ b/sys-utils/hwclock-rtc.c @@ -402,10 +402,7 @@ int get_epoch_rtc(const struct hwclock_control *ctl, unsigned long *epoch_p) rtc_fd = open_rtc(ctl); if (rtc_fd < 0) { - if (errno == ENOENT) - warnx(_("%s does not exist."), rtc_dev_name); - else - warn(_("cannot open %s"), rtc_dev_name); + warn(_("cannot open %s"), rtc_dev_name); return 1; } @@ -440,10 +437,7 @@ int set_epoch_rtc(const struct hwclock_control *ctl) rtc_fd = open_rtc(ctl); if (rtc_fd < 0) { - if (errno == ENOENT) - warnx(_("%s does not exist."), rtc_dev_name); - else - warn(_("cannot open %s"), rtc_dev_name); + warn(_("cannot open %s"), rtc_dev_name); return 1; } |