From 617413d1af18e7e9e5c76f416263615bbf1174a5 Mon Sep 17 00:00:00 2001 From: Richard Lowe Date: Tue, 12 Mar 2013 19:31:47 -0400 Subject: 3623 kstat must accept partial stat specification Reviewed by: Theo Schlossnagle Reviewed by: David Höppner <0xffea@gmail.com> Reviewed by: Gordon Ross Approved by: Eric Schrock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/cmd/stat/kstat/kstat.c | 11 ++--------- usr/src/man/man1m/kstat.1m | 2 +- 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 -- cgit v1.2.3