Page MenuHomeFreeBSD

Fix geom help output
ClosedPublic

Authored by feld on Nov 12 2014, 2:32 PM.

Details

Reviewers
bapt
pjd
Summary

Scenario: funny business in the usage output of geom command

Before patch:

vm# geom pjd
usage: geom pjd help
       geom pjd list [-a] [name ...]
       geom pjd status [-ags] [name ...]
       geom pjd load [-v]
       geom pjd unload [-v]
vm# geom pjd list
geom: Command 'list' not available.
vm# geom stripe list
geom: Command 'list' not available.
vm# kldstat
Id Refs Address            Size     Name
 1    8 0xffffffff80200000 15f0430  kernel
 2    1 0xffffffff81a12000 2a53     uhid.ko
 3    1 0xffffffff81a15000 265f     pflog.ko
 4    1 0xffffffff81a18000 2f17f    pf.ko
vm# geom stripe
usage: geom stripe clear [-v] prov ...
       geom stripe create [-hv] [-s stripesize] name prov prov ...
       geom stripe destroy [-fv] name ...
       geom stripe dump prov ...
       geom stripe label [-hv] [-s stripesize] name prov prov ...
       geom stripe stop [-fv] name ...
       geom stripe help
       geom stripe list [-a] [name ...]
       geom stripe status [-ags] [name ...]
       geom stripe load [-v]
       geom stripe unload [-v]

Ok, seems to be working as expected, but it's not detecting "pjd" as an
invalid class.

After patch:

vm# geom pjd
geom: Invalid class name.
vm# geom pjd list
geom: Invalid class name.
vm# geom stripe list
geom: Command 'list' not available.
vm# geom stripe
usage: geom stripe clear [-v] prov ...
       geom stripe create [-hv] [-s stripesize] name prov prov ...
       geom stripe destroy [-fv] name ...
       geom stripe dump prov ...
       geom stripe label [-hv] [-s stripesize] name prov prov ...
       geom stripe stop [-fv] name ...
       geom stripe help
       geom stripe list [-a] [name ...]
       geom stripe status [-ags] [name ...]
       geom stripe load [-v]
       geom stripe unload [-v]
vm# geom disk list
Geom name: vtbd0
Providers:
1. Name: vtbd0
   Mediasize: 16106127360 (15G)
   Sectorsize: 512
   Mode: r2w2e5
   descr: (null)
   ident: (null)
   fwsectors: 63
   fwheads: 16

Geom name: cd0
Providers:
1. Name: cd0
   Mediasize: 0 (0B)
   Sectorsize: 2048
   Mode: r0w0e0
   descr: QEMU QEMU DVD-ROM
   ident: (null)
   fwsectors: 0
   fwheads: 0

Everything looks ok / functional still and it isn't doing anything unexpected.

Adding bapt as he reported it in IRC a few weeks ago :-)

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

feld updated this revision to Diff 2373.Nov 12 2014, 2:32 PM
feld retitled this revision from to Fix geom help output.
feld updated this object.
feld edited the test plan for this revision. (Show Details)
feld added reviewers: pjd, bapt.
feld set the repository for this revision to rS FreeBSD src repository.
feld updated this object.Nov 12 2014, 2:34 PM
feld updated this object.
feld updated this object.Nov 12 2014, 2:39 PM
feld updated this revision to Diff 2374.Nov 12 2014, 2:52 PM
feld added a subscriber: emaste.

per @bapt and @emaste -- diff needs full context.

Apologize for the noise... terribly embarassed. Trying to get the process right :-)

pjd accepted this revision.Nov 12 2014, 10:50 PM
pjd edited edge metadata.

Macro goatforit:

This revision is now accepted and ready to land.Nov 12 2014, 10:50 PM
feld closed this revision.Nov 18 2014, 1:39 PM

Committed. Thanks all!