[PATCH 3/3] textual: harmonize the messages for invalid count and timeout values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Benno Schulenberg <bensberg@xxxxxxxxxx>
---
 login-utils/sulogin.c | 2 +-
 misc-utils/findmnt.c  | 2 +-
 misc-utils/uuidgen.c  | 2 +-
 misc-utils/waitpid.c  | 5 ++---
 sys-utils/flock.c     | 3 +--
 sys-utils/wdctl.c     | 4 ++--
 term-utils/agetty.c   | 2 +-
 term-utils/wall.c     | 4 ++--
 8 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 0de850508..eb4609db6 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -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;
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index ee9371e69..31350df78 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -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;
diff --git a/misc-utils/uuidgen.c b/misc-utils/uuidgen.c
index 6133cb0eb..8e07cdb65 100644
--- a/misc-utils/uuidgen.c
+++ b/misc-utils/uuidgen.c
@@ -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;
diff --git a/misc-utils/waitpid.c b/misc-utils/waitpid.c
index f108206a9..b63532790 100644
--- a/misc-utils/waitpid.c
+++ b/misc-utils/waitpid.c
@@ -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':
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index 6e58a1d51..fe1a71f72 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -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,
diff --git a/sys-utils/wdctl.c b/sys-utils/wdctl.c
index b3203d461..f3ae0e3f8 100644
--- a/sys-utils/wdctl.c
+++ b/sys-utils/wdctl.c
@@ -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':
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index f65e511ca..5e564c4f0 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -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;
diff --git a/term-utils/wall.c b/term-utils/wall.c
index 293275cb3..1152a1222 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -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);
-- 
2.48.2





[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux