[PATCH 00/16] cytune: one change more, and a change to option deprecation

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

 



Hi Karel,

Earlier today the user interface was NACK'd.  I should have seen that
coming, but since I did not the '[PATCH 11/15] cytune: deprecate
undescriptive options' was reworked.  Basically deprecation is gone, and
this time bash completion is updated as well.  Here is the latest version.

https://github.com/kerolasa/lelux-utiliteetit/commit/c8e38c347edeafc1660c6e98cf6759b7d80811b3

We had a off-list chat with Benno about messaging, with results of a
patch that can be applied on top of the other 15 changes.  This change
can be found from my git.


--->8----
From: Benno Schulenberg <bensberg@xxxxxxxxxxxxx>
Date: Mon, 5 May 2014 20:41:14 +0100
Subject: [PATCH 16/16] cytune: improve messaging

Reviewed-by: Sami Kerola <kerolasa@xxxxxx>
Signed-off-by: Benno Schulenberg <bensberg@xxxxxxxxxxxxx>
---
 sys-utils/cytune.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/sys-utils/cytune.c b/sys-utils/cytune.c
index 964ca8f..b3b2902 100644
--- a/sys-utils/cytune.c
+++ b/sys-utils/cytune.c
@@ -306,9 +306,9 @@ int main(int argc, char **argv)
 			mod.set_threshold_def = 1;
 			intention_expressed = 1;
 			mod.threshold_def_val = strtou32_or_err(optarg,
-						_("Invalid threshold default value"));
+						_("Invalid default threshold value"));
 			if (mod.threshold_def_val < 0 || 12 < mod.threshold_def_val)
-				errx(EXIT_FAILURE, ("Invalid threshold default value: %d"),
+				errx(EXIT_FAILURE, ("Invalid default threshold value: %d"),
 						    mod.threshold_def_val);
 			break;
 		case OPT_SET_FLUSH:
@@ -316,9 +316,9 @@ int main(int argc, char **argv)
 			mod.set_timeout = 1;
 			intention_expressed = 1;
 			mod.timeout_val = strtou32_or_err(optarg,
-						_("Invalid set timeout value"));
+						_("Invalid timeout value"));
 			if (mod.timeout_val < 1 || 255 < mod.timeout_val)
-				errx(EXIT_FAILURE, _("Invalid set timeout value: %d"),
+				errx(EXIT_FAILURE, _("Invalid timeout value: %d"),
 						     mod.timeout_val);
 			break;
 		case OPT_SET_FLUSH_DEFAULT:
@@ -328,7 +328,7 @@ int main(int argc, char **argv)
 			mod.timeout_def_val = strtou32_or_err(optarg,
 						_("Invalid default timeout value"));
 			if (mod.timeout_def_val < 0 || 255 < mod.timeout_def_val)
-				errx(EXIT_FAILURE, _("Invalid default time value: %d"),
+				errx(EXIT_FAILURE, _("Invalid default timeout value: %d"),
 						     mod.timeout_def_val);
 			break;
 		case OPT_GET_TRESHHOLD:
@@ -364,25 +364,25 @@ int main(int argc, char **argv)
 
 		if (mod.set_threshold)
 			if (ioctl(file, CYSETTHRESH, mod.threshold_val))
-				err(EXIT_FAILURE, _("cannot set %s to threshold %d"), argv[i], mod.threshold_val);
+				err(EXIT_FAILURE, _("cannot set threshold to %d for %s"), mod.threshold_val, argv[i]);
 
 		if (mod.set_threshold_def)
 			if (ioctl(file, CYSETDEFTHRESH, mod.threshold_def_val))
-				err(EXIT_FAILURE, _("cannot set %s to threshold %d"), argv[i], mod.threshold_def_val);
+				err(EXIT_FAILURE, _("cannot set default threshold to %d for %s"), mod.threshold_def_val, argv[i]);
 
 		if (mod.set_timeout)
 			if (ioctl(file, CYSETTIMEOUT, mod.timeout_val))
-				err(EXIT_FAILURE, _("cannot set %s to time threshold %d"), argv[i], mod.timeout_val);
+				err(EXIT_FAILURE, _("cannot set timeout to %d for %s"), mod.timeout_val, argv[i]);
 
 		if (mod.set_timeout_def)
 			if (ioctl(file, CYSETDEFTIMEOUT, mod.timeout_def_val))
-				err(EXIT_FAILURE, _("cannot set %s to time threshold %d"), argv[i], mod.timeout_def_val);
+				err(EXIT_FAILURE, _("cannot set default timeout to %d for %s"), mod.timeout_def_val, argv[i]);
 
 		if (mod.get_defaults) {
 			if (ioctl(file, CYGETDEFTHRESH, &mod.threshold_value))
-				err(EXIT_FAILURE, _("cannot get threshold for %s"), argv[i]);
+				err(EXIT_FAILURE, _("cannot get default threshold for %s"), argv[i]);
 			if (ioctl(file, CYGETDEFTIMEOUT, &mod.timeout_value))
-				err(EXIT_FAILURE, _("cannot get timeout for %s"), argv[i]);
+				err(EXIT_FAILURE, _("cannot get default timeout for %s"), argv[i]);
 			printf(_("%s: %ld default threshold and %ld default timeout\n"),
 			       argv[i], mod.threshold_value, mod.timeout_value);
 		}
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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