Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/cpuctl Fix a bug that an unknown command is printed...
details: https://anonhg.NetBSD.org/src/rev/7f0af242f1fc
branches: trunk
changeset: 334934:7f0af242f1fc
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Dec 16 04:07:40 2014 +0000
description:
Fix a bug that an unknown command is printed as "(null)".
Reported by Fredrik Pettai.
diffstat:
usr.sbin/cpuctl/cpuctl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c60b85e32adc -r 7f0af242f1fc usr.sbin/cpuctl/cpuctl.c
--- a/usr.sbin/cpuctl/cpuctl.c Mon Dec 15 16:45:26 2014 +0000
+++ b/usr.sbin/cpuctl/cpuctl.c Tue Dec 16 04:07:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuctl.c,v 1.24 2014/11/20 12:49:13 msaitoh Exp $ */
+/* $NetBSD: cpuctl.c,v 1.25 2014/12/16 04:07:40 msaitoh Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#ifndef lint
#include <sys/cdefs.h>
-__RCSID("$NetBSD: cpuctl.c,v 1.24 2014/11/20 12:49:13 msaitoh Exp $");
+__RCSID("$NetBSD: cpuctl.c,v 1.25 2014/12/16 04:07:40 msaitoh Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -119,7 +119,7 @@
}
if (ct->label == NULL)
- errx(EXIT_FAILURE, "unknown command ``%s''", argv[optind]);
+ errx(EXIT_FAILURE, "unknown command ``%s''", argv[0]);
close(fd);
exit(EXIT_SUCCESS);
Home |
Main Index |
Thread Index |
Old Index