]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: fix return value on successful --param-get
authorBastian Krause <bst@pengutronix.de>
Wed, 21 Dec 2022 10:44:23 +0000 (11:44 +0100)
committerBastian Krause <bst@pengutronix.de>
Wed, 21 Dec 2022 10:50:05 +0000 (11:50 +0100)
hwclock should return 0 on sucessful --param-get.

Fixes: 6097b12df ("hwclock: add --param-get option")
Signed-off-by: Bastian Krause <bst@pengutronix.de>
sys-utils/hwclock.c

index 1bd371a0b3d6b4bb1ffded1604a56a4753d86f7c..ad1eb688e49600e497a385b52f9d26576e2d2e4a 100644 (file)
@@ -1169,6 +1169,7 @@ manipulate_rtc_param(const struct hwclock_control *ctl)
 
                printf(_("The RTC parameter 0x%jx is set to 0x%jx.\n"),
                       (uintmax_t) id, (uintmax_t) value);
+               return 0;
 
        } else if (ctl->param_set_option) {
                if (ctl->testing)