[PATCH 1/5] hwclock: use errtryhelp()

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

 



* sys-utils/hwclock.c: use errtryhelp() instead of usage().

Signed-off-by: J William Piggott <elseifthen@xxxxxxx>
---
 sys-utils/hwclock.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 3875bcc..a99eb6d 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1479,9 +1479,9 @@ int main(int argc, char **argv)
 			out_version();
 			return 0;
 		case 'h':			/* --help */
-		case '?':
-		default:
 			usage(&ctl, NULL);
+		default:
+			errtryhelp(EXIT_FAILURE);
 		}
 	}
 
@@ -1497,9 +1497,8 @@ int main(int argc, char **argv)
 	}
 #endif
 	if (argc > 0) {
-		usage(&ctl, _("%s takes no non-option arguments.  "
-			"You supplied %d.\n"), program_invocation_short_name,
-		      argc);
+		warnx(_("%d too many arguments given"), argc);
+		errtryhelp(EXIT_FAILURE);
 	}
 
 	if (!ctl.adj_file_name)
--
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