summaryrefslogtreecommitdiffstats
path: root/tools/lvm.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2002-11-29 15:02:57 +0000
committerAlasdair Kergon <agk@redhat.com>2002-11-29 15:02:57 +0000
commitc80325cae484b3ea1cea4f4ad889ad4a912f76f2 (patch)
tree7e4e2dd095617b754b3825a61c3dac158c3bbcfd /tools/lvm.c
parent62ef058497f6c3618f930930eb5dd4bf94dabb25 (diff)
downloadlvm2-c80325cae484b3ea1cea4f4ad889ad4a912f76f2.tar.gz
lvm2-c80325cae484b3ea1cea4f4ad889ad4a912f76f2.tar.xz
lvm2-c80325cae484b3ea1cea4f4ad889ad4a912f76f2.zip
Further help text tidying & support for -?.
Diffstat (limited to 'tools/lvm.c')
-rw-r--r--tools/lvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lvm.c b/tools/lvm.c
index 526c1847..baa7c979 100644
--- a/tools/lvm.c
+++ b/tools/lvm.c
@@ -305,7 +305,7 @@ static void _register_commands()
{
#define xx(a, b, c...) _register_command(# a, a, b, ## c, \
driverloaded_ARG, \
- debug_ARG, help_ARG, \
+ debug_ARG, help_ARG, help2_ARG, \
version_ARG, verbose_ARG, \
quiet_ARG, -1);
#include "commands.h"
@@ -543,7 +543,7 @@ static int _get_settings(struct cmd_context *cmd)
static int _process_common_commands(struct cmd_context *cmd)
{
- if (arg_count(cmd, help_ARG)) {
+ if (arg_count(cmd, help_ARG) || arg_count(cmd, help2_ARG)) {
usage(cmd->command->name);
return ECMD_PROCESSED;
}
@@ -959,7 +959,7 @@ static char *_list_args(const char *text, int state)
char *l;
l = (the_args +
com->valid_args[match_no++ - com->num_args])->long_arg;
- if (!strncmp(text, l, len))
+ if (*(l + 2) && !strncmp(text, l, len))
return strdup(l);
}