LVM2 ./WHATS_NEW tools/lvmcmdline.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: meyering at sourceware.org 2007-09-21 18:06:33
Modified files:
. : WHATS_NEW
tools : lvmcmdline.c
Log message:
After a diagnostic, suggest --help, rather than printing all --help output.
Print just one line:
Use `COMMAND --help' for more information.
after "real" diagnostic(s), rather than all of the usage lines. Otherwise, the 30-40+ lines of --help output could obscure the real diagnostic.
Author: Jim Meyering <[email protected]>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.711&r2=1.712
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.29 - ================================== + After a diagnostic, suggest --help, rather than printing all --help output. Add %PVS extents option to lvresize, lvextend, and lvcreate. Moved the obsolete test subdirectory to old-tests. Remove no-longer-correct restrictions on PV arg count with stripes/mirrors.
tools/lvmcmdline.c +6 -1
@@ -466,6 +466,11 @@return _cmdline.commands + i; } +static void _short_usage (const char *name) +{ +log_error ("Run `%s --help' for more information.\n" , name); +} +static void _usage (const char *name) {struct command *com =_find_command (name);
@@ -921,7 +926,7 @@dm_pool_empty (cmd->mem);if (ret ==EINVALID_CMD_LINE && !_cmdline.interactive) -_usage (cmd->command->name); +_short_usage (cmd->command->name);log_debug ("Completed: %s" , cmd->cmd_line);