]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
textual: harmonize the messages for invalid count and timeout values
authorBenno Schulenberg <bensberg@telfort.nl>
Wed, 9 Jul 2025 09:07:34 +0000 (11:07 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 14 Jul 2025 11:57:12 +0000 (13:57 +0200)
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
login-utils/sulogin.c
misc-utils/findmnt.c
misc-utils/uuidgen.c
misc-utils/waitpid.c
sys-utils/flock.c
sys-utils/wdctl.c
term-utils/agetty.c
term-utils/wall.c

index 0de8505089be2984a47bf11dd050d98b74ec7286..eb4609db656f9d27136b2873689418b83c036cdb 100644 (file)
@@ -1037,7 +1037,7 @@ int main(int argc, char **argv)
        while ((c = getopt_long(argc, argv, "ehpt:V", longopts, NULL)) != -1) {
                switch(c) {
                case 't':
-                       timeout = strtou32_or_err(optarg, _("invalid timeout argument"));
+                       timeout = strtou32_or_err(optarg, _("invalid timeout"));
                        break;
                case 'p':
                        profile = 1;
index ee9371e6902a5dbce87f3fa89ec8f14a7016aa84..31350df78d16b516b22470c00e08e5a58875345d 100644 (file)
@@ -1998,7 +1998,7 @@ int main(int argc, char *argv[])
                        findmnt.flags |= FL_UNIQ;
                        break;
                case 'w':
-                       timeout = strtos32_or_err(optarg, _("invalid timeout argument"));
+                       timeout = strtos32_or_err(optarg, _("invalid timeout"));
                        break;
                case 'x':
                        verify = 1;
index 6133cb0ebcc36a2bd5f7bcb0db7a3ae208f26770..8e07cdb650191249b8c373959962cd2914db82ed 100644 (file)
@@ -147,7 +147,7 @@ main (int argc, char *argv[])
                        do_type = UUID_TYPE_DCE_MD5;
                        break;
                case 'C':
-                       count = strtou32_or_err(optarg, _("invalid count argument"));
+                       count = strtou32_or_err(optarg, _("invalid count"));
                        break;
                case 's':
                        do_type = UUID_TYPE_DCE_SHA1;
index f108206a9db566841ec387e5f6640b97b9bcb9e2..b635327901ede0af6353f148aca9dea7889f6e7f 100644 (file)
@@ -197,14 +197,13 @@ static int parse_options(int argc, char **argv)
                        verbose = true;
                        break;
                case 't':
-                       strtotimespec_or_err(optarg, &timeout,
-                                            _("Could not parse timeout"));
+                       strtotimespec_or_err(optarg, &timeout,  _("invalid timeout"));
                        break;
                case 'e':
                        allow_exited = true;
                        break;
                case 'c':
-                       count = str2num_or_err(optarg, 10, _("Invalid count"),
+                       count = str2num_or_err(optarg, 10, _("invalid count"),
                                               1, INT64_MAX);
                        break;
                case 'V':
index 6e58a1d5167da0805d4bdc02fdadc766bcad9fe4..fe1a71f7282168ff560eeab09ad719ded1e7db78 100644 (file)
@@ -273,8 +273,7 @@ int main(int argc, char *argv[])
                        break;
                case 'w':
                        have_timeout = 1;
-                       strtotimeval_or_err(optarg, &timeout.it_value,
-                               _("invalid timeout value"));
+                       strtotimeval_or_err(optarg, &timeout.it_value, _("invalid timeout"));
                        break;
                case 'E':
                        conflict_exit_code = strtos32_or_err(optarg,
index b3203d461186be73b391391d2ed84f946e1eb73a..f3ae0e3f8c67f378ad72893b48d9c37bd4abb136 100644 (file)
@@ -792,11 +792,11 @@ int main(int argc, char *argv[])
                                return EXIT_FAILURE;
                        break;
                case 's':
-                       ctl.timeout = strtos32_or_err(optarg, _("invalid timeout argument"));
+                       ctl.timeout = strtos32_or_err(optarg, _("invalid timeout"));
                        ctl.set_timeout = 1;
                        break;
                case 'p':
-                       ctl.pretimeout = strtos32_or_err(optarg, _("invalid pretimeout argument"));
+                       ctl.pretimeout = strtos32_or_err(optarg, _("invalid pretimeout"));
                        ctl.set_pretimeout = 1;
                        break;
                case 'f':
index f65e511ca60e890054a9b93ba4c2b15a13f4dc0f..5e564c4f03349fbc81b89c229e7aa569e5e90da3 100644 (file)
@@ -852,7 +852,7 @@ static void parse_args(int argc, char **argv, struct options *op)
                        op->flags |= F_KEEPSPEED;
                        break;
                case 't':
-                       op->timeout = strtou32_or_err(optarg,  _("invalid timeout argument"));
+                       op->timeout = strtou32_or_err(optarg,  _("invalid timeout"));
                        break;
                case 'U':
                        op->flags |= F_LCUC;
index 293275cb3ef6aded91e9e2862529eb298109e3dc..1152a122213bc418ebc676fbc131d7fc118cf827 100644 (file)
@@ -240,9 +240,9 @@ int main(int argc, char **argv)
                                warnx(_("--nobanner is available only for root"));
                        break;
                case 't':
-                       timeout = strtou32_or_err(optarg, _("invalid timeout argument"));
+                       timeout = strtou32_or_err(optarg, _("invalid timeout"));
                        if (timeout < 1)
-                               errx(EXIT_FAILURE, _("invalid timeout argument: %s"), optarg);
+                               errx(EXIT_FAILURE, _("invalid timeout: %s"), optarg);
                        break;
                case 'g':
                        group_buf = init_group_workspace(optarg);