From: Tokunori Ikegami Date: Fri, 2 Jun 2023 00:15:13 +0000 (+0900) Subject: plugin: Change version and usage names for linux kernel check patch warnings X-Git-Tag: v2.5~72 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6043f931140280628c56707eba5500cfd82e2268;p=users%2Fsagi%2Fnvme-cli.git plugin: Change version and usage names for linux kernel check patch warnings Also change usage function as a static function since not used externally. Signed-off-by: Tokunori Ikegami --- diff --git a/plugin.c b/plugin.c index 3e2b62fa..a5cb4f99 100644 --- a/plugin.c +++ b/plugin.c @@ -9,7 +9,7 @@ #include -static int version(struct plugin *plugin) +static int version_cmd(struct plugin *plugin) { struct program *prog = plugin->parent; @@ -55,7 +55,7 @@ static int help(int argc, char **argv, struct plugin *plugin) return 0; } -void usage(struct plugin *plugin) +static void usage_cmd(struct plugin *plugin) { struct program *prog = plugin->parent; @@ -75,7 +75,7 @@ void general_help(struct plugin *plugin) printf("%s-%s\n", prog->name, prog->version); - usage(plugin); + usage_cmd(plugin); printf("\n"); print_word_wrapped(prog->desc, 0, 0, stdout); @@ -163,7 +163,7 @@ int handle_plugin(int argc, char **argv, struct plugin *plugin) if (!strcmp(str, "help")) return help(argc, argv, plugin); if (!strcmp(str, "version")) - return version(plugin); + return version_cmd(plugin); while (*cmd) { if (!strcmp(str, (*cmd)->name) || diff --git a/plugin.h b/plugin.h index 6f61a210..03bd95a7 100644 --- a/plugin.h +++ b/plugin.h @@ -31,7 +31,6 @@ struct command { char *alias; }; -void usage(struct plugin *plugin); void general_help(struct plugin *plugin); int handle_plugin(int argc, char **argv, struct plugin *plugin);