Module Name: src
Committed By: snj
Date: Sun Dec 21 19:28:38 UTC 2014
Modified Files:
src/usr.sbin/cpuctl [netbsd-7]: cpuctl.c
Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #336):
usr.sbin/cpuctl/cpuctl.c: revision 1.25
Fix a bug that an unknown command is printed as "(null)".
Reported by Fredrik Pettai.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.4.1 src/usr.sbin/cpuctl/cpuctl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/cpuctl/cpuctl.c
diff -u src/usr.sbin/cpuctl/cpuctl.c:1.23 src/usr.sbin/cpuctl/cpuctl.c:1.23.4.1
--- src/usr.sbin/cpuctl/cpuctl.c:1.23 Mon Dec 23 12:35:33 2013
+++ src/usr.sbin/cpuctl/cpuctl.c Sun Dec 21 19:28:38 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuctl.c,v 1.23 2013/12/23 12:35:33 msaitoh Exp $ */
+/* $NetBSD: cpuctl.c,v 1.23.4.1 2014/12/21 19:28:38 snj 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.23 2013/12/23 12:35:33 msaitoh Exp $");
+__RCSID("$NetBSD: cpuctl.c,v 1.23.4.1 2014/12/21 19:28:38 snj Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -119,7 +119,7 @@ main(int argc, char **argv)
}
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);