]> git.ipfire.org Git - thirdparty/util-linux.git/commit
hwclock: squash custom errno strings
authorJ William Piggott <elseifthen@gmx.com>
Sun, 23 Jul 2017 17:21:32 +0000 (13:21 -0400)
committerJ William Piggott <elseifthen@gmx.com>
Mon, 31 Jul 2017 20:10:47 +0000 (16:10 -0400)
commit0d7ffb9c856fe07fe3e5afa6ae563b86dbc0e2f1
treeae7c4e2e3824878c4d0d18960e9df2539504aaf5
parent8df545592d73b67b0bf119732b52a5e4c0662ec4
hwclock: squash custom errno strings

hwclock previously used printf for custom errno messages.
Later they were converted to use warn(), but were not
squashed. One of the reasons for warn and errno is to avoid
making translators deal with a multitude custom strings.

Also the custom strings are incorrect:

hwclock --hctosys
hwclock: Must be superuser to set system clock.
Unable to set system clock.

We do not know what the system permissions are set to.  The
correct response is to simply say permission was denied; as
the default errno string does. The second line is redundant
and just adds noise the code and to logs.

Patched:

hwclock --hctosys
hwclock: settimeofday() failed: Operation not permitted

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