Mercurial > illumos > illumos-gate
changeset 13984:dc0c7baefe32
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>
author | Richard Lowe <richlowe@richlowe.net> |
---|---|
date | Tue, 12 Mar 2013 19:31:47 -0400 |
parents | fe80600e1f8e |
children | ad441dd34478 |
files | usr/src/cmd/stat/kstat/kstat.c usr/src/man/man1m/kstat.1m |
diffstat | 2 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/stat/kstat/kstat.c Mon Mar 11 16:29:50 2013 -0800 +++ b/usr/src/cmd/stat/kstat/kstat.c Tue Mar 12 19:31:47 2013 -0400 @@ -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 @@ } } - if (m < 4) { - free(uselector); - usage(); - exit(2); - } - uselflg = B_TRUE; list_insert_tail(&selector_list, uselector); } else { @@ -297,7 +290,7 @@ 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 @@ " [ -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")); }
--- a/usr/src/man/man1m/kstat.1m Mon Mar 11 16:29:50 2013 -0800 +++ b/usr/src/man/man1m/kstat.1m Tue Mar 12 19:31:47 2013 -0400 @@ -17,7 +17,7 @@ .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