Skip to content

Commit

Permalink
3623 kstat must accept partial stat specification
Browse files Browse the repository at this point in the history
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
richlowe committed Mar 14, 2013
1 parent b3a6f80 commit 617413d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions usr/src/cmd/stat/kstat/kstat.c
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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"));
}

Expand Down
2 changes: 1 addition & 1 deletion usr/src/man/man1m/kstat.1m
Expand Up @@ -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

Expand Down

0 comments on commit 617413d

Please sign in to comment.