diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-02-25 18:09:52 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-03-02 22:54:40 +0100 |
commit | 081e47912e6c80f233fec5d472e32e1ac4f19a78 (patch) | |
tree | c1f3ebb34452775694177fdfc7020c1679193541 /tools/command.h | |
parent | 589c6545627cdc5a90bf4c2e4640c42d9623bb47 (diff) | |
download | lvm2-081e47912e6c80f233fec5d472e32e1ac4f19a78.tar.gz |
cmdline: use binary search
Reduce strcmp() call count by using binary search to find
commands in cmd_names[] and command_names[] arrays.
Diffstat (limited to 'tools/command.h')
-rw-r--r-- | tools/command.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/command.h b/tools/command.h index c0d7977dc..325ad1dd0 100644 --- a/tools/command.h +++ b/tools/command.h @@ -272,5 +272,6 @@ void print_usage_notes(struct command_name *cname); void factor_common_options(void); int command_has_alternate_extents(const char *name); void configure_command_option_values(const char *name); +struct command_name *find_command_name(const char *name); #endif |