Permalink
Browse files

3623 kstat must accept partial stat specification

Reviewed by: Theo Schlossnagle <jesus@omniti.com>
Reviewed by: David Höppner <0xffea@gmail.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Eric Schrock <eric.schrock@delphix.com>
  • Loading branch information...
1 parent b3a6f80 commit 617413d1af18e7e9e5c76f416263615bbf1174a5 @richlowe richlowe committed Mar 12, 2013
Showing with 3 additions and 10 deletions.
  1. +2 −9 usr/src/cmd/stat/kstat/kstat.c
  2. +1 −1 usr/src/man/man1m/kstat.1m
@@ -33,7 +33,6 @@
*
* Incompatibilities:
* - perl regular expressions replaced with extended REs bracketed by '/'
- * - options checking is stricter
*
* Flags added:
* -C similar to the -p option but value is separated by a colon
@@ -255,12 +254,6 @@ main(int argc, char **argv)
}
}
- if (m < 4) {
- free(uselector);
- usage();
- exit(2);
- }
-
uselflg = B_TRUE;
list_insert_tail(&selector_list, uselector);
} else {
@@ -297,7 +290,7 @@ main(int argc, char **argv)
if (uselflg) {
if (nselflg) {
(void) fprintf(stderr, gettext(
- "module:instance:name:statistic and "
+ "[module[:instance[:name[:statistic]]]] and "
"-m -i -n -s are mutually exclusive"));
usage();
exit(2);
@@ -362,7 +355,7 @@ usage(void)
" [ -m module ] [ -i instance ] [ -n name ] [ -s statistic ]\n"
" [ interval [ count ] ]\n"
"kstat [ -Cjlpq ] [ -T d|u ] [ -c class ]\n"
- " [ module:instance:name:statistic ... ]\n"
+ " [ module[:instance[:name[:statistic]]] ... ]\n"
" [ interval [ count ] ]\n"));
}
@@ -17,7 +17,7 @@ kstat \- display kernel statistics
.LP
.nf
\fBkstat\fR [\fB-Cjlpq\fR] [\fB-T\fR u | d ] [\fB-c\fR \fIclass\fR]
- [\fImodule\fR:\fIinstance\fR:\fIname\fR:\fIstatistic\fR]...
+ [\fImodule\fR[:\fIinstance\fR[:\fIname\fR[:\fIstatistic\fR]]]]...
[interval [count]]
.fi

0 comments on commit 617413d

Please sign in to comment.