summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2013-03-12 19:31:47 -0400
committerRichard Lowe <richlowe@richlowe.net>2013-03-14 15:43:43 -0400
commit617413d1af18e7e9e5c76f416263615bbf1174a5 (patch)
treec68538874593e7358526ab8eccd071ab6e7e36dc
parentb3a6f80422cf5830e402a39597c46faacc3df256 (diff)
downloadillumos-joyent-617413d1af18e7e9e5c76f416263615bbf1174a5.tar.gz
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>
-rw-r--r--usr/src/cmd/stat/kstat/kstat.c11
-rw-r--r--usr/src/man/man1m/kstat.1m2
2 files changed, 3 insertions, 10 deletions
diff --git a/usr/src/cmd/stat/kstat/kstat.c b/usr/src/cmd/stat/kstat/kstat.c
index 2165101ac9..6f9ef1260c 100644
--- a/usr/src/cmd/stat/kstat/kstat.c
+++ b/usr/src/cmd/stat/kstat/kstat.c
@@ -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"));
}
diff --git a/usr/src/man/man1m/kstat.1m b/usr/src/man/man1m/kstat.1m
index c7ce68f4ea..ecf696c2b0 100644
--- a/usr/src/man/man1m/kstat.1m
+++ b/usr/src/man/man1m/kstat.1m
@@ -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