Page MenuHomeFreeBSD

Fix geom help output
ClosedPublic

Authored by feld on Nov 12 2014, 2:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 6:22 AM
Unknown Object (File)
Tue, Apr 16, 12:52 AM
Unknown Object (File)
Nov 23 2023, 4:55 PM
Unknown Object (File)
Nov 21 2023, 9:52 AM
Unknown Object (File)
Nov 2 2023, 7:08 PM
Unknown Object (File)
Oct 28 2023, 1:24 AM
Unknown Object (File)
Oct 28 2023, 1:07 AM
Unknown Object (File)
Oct 19 2023, 6:25 PM
Subscribers

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
Tests Skipped

Event Timeline

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 - subversion.
feld updated this object.
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 edited edge metadata.

Macro goatforit:

This revision is now accepted and ready to land.Nov 12 2014, 10:50 PM

Committed. Thanks all!