svn commit: r258053 - head/usr.sbin/mfiutil

Bruce Evans brde at optusnet.com.au
Wed Nov 13 10:44:25 UTC 2013


On Tue, 12 Nov 2013, John Baldwin wrote:

> On Tuesday, November 12, 2013 12:10:56 pm Sean Bruno wrote:
>> Author: sbruno
>> Log:
>>   Noted that the stripe_size argument was not being displayed in the usage
>>   message
>
> Does this need some wrapping to fit in 80 cols now?

Of course.  The output style is horrible enough without inconsostencies in
it.  It doesn't have to be as bad as the source.  Previous output:

% mptutil: illegal option -- ?
% usage: mptutil [-u unit] <command> ...

Oops, wrong command.  It has slightly different bugs.  E.g., the man page
says "-s stripe_size" while the usage message says "-s stripe".  There are
many more.

Perhaps this doesn't need further description, but verbose descriptions
are part of the non-KNF style here.

See the man page for splitting this after the addition.  But this and the
man page have other bugs:
- v and q are sorted backwards here.  The man page sorts them forwards, but
   doesn't group them

% mfiutil: illegal option -- ?
% usage: mfiutil [-de] [-u unit] <command> ...
% 
% Commands include:
%     version
%     show adapter              - display controller information
%     show battery              - display battery information
%     show config               - display RAID configuration
%     show drives               - list physical drives
%     show events               - display event log
%     show firmware             - list firmware images
%     show foreign              - display detected foreign volumes
%     show logstate             - display event log sequence numbers
%     show volumes              - list logical volumes
%     show patrol               - display patrol read status
%     show progress             - display status of active operations
%     fail <drive>              - fail a physical drive
%     good <drive>              - set a failed/SYSPD drive as UNCONFIGURED
%     rebuild <drive>           - mark failed drive ready for rebuild
%     syspd <drive>             - set drive into use as SYSPD JBOD
%     drive progress <drive>    - display status of active operations
%     drive clear <drive> <start|stop> - clear a drive with all 0x00

mptutil is more careful about formatting.  It starts a new line for the
description if necessary to align it.

%     start rebuild <drive>
%     abort rebuild <drive>

Some commands are missing descriptions.

%     locate <drive> <on|off>   - toggle drive LED
%     cache <volume> [command [setting]]
%     name <volume> <name>
%     volume progress <volume>  - display status of active operations
%     clear                     - clear volume configuration
%     create <type> [-v] <drive>[,<drive>[,...]] [<drive>[,<drive>[,...]]

This command needs a description more than the simple ones.

See the man page for (not very good) formatting of the line splitting.  It
aligns with the option before "create", but should align with the option
after "create".

The man page doesn't use angle brackets around parameters like <drive>.

The syntax for the 1 or 2 drive lists is complicated and perhaps not
worth giving in detaul here.

%     delete <volume>
%     add <drive> [volume]      - add a hot spare
%     remove <drive>            - remove a hot spare
%     patrol <disable|auto|manual> [interval [start]]
%     start patrol              - start a patrol read
%     stop patrol               - stop a patrol read

The order of at least the patrol-related commands is different to the man
page.

%     foreign scan              - scan for foreign configurations
%     foreign clear [volume]    - clear foreign configurations (default all)
%     foreign diag [volume]     - diagnostic display foreign configurations (default all)

This was already too long.

%     foreign preview [volume]  - preview foreign configurations (default all)
%     foreign import [volume]   - import foreign configurations (default all)
%     flash <firmware>
%     start learn               - start a BBU relearn
%     bbu <setting> <value>     - set BBU properties

Bruce


More information about the svn-src-head mailing list