mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
command: more arrays keep static
This commit is contained in:
parent
45d9b2c470
commit
e654b9cba9
@ -84,13 +84,13 @@ static const struct cmd_name cmd_names[CMD_COUNT + 1] = {
|
|||||||
|
|
||||||
#ifdef MAN_PAGE_GENERATOR
|
#ifdef MAN_PAGE_GENERATOR
|
||||||
|
|
||||||
struct command_name command_names[] = {
|
static struct command_name command_names[] = {
|
||||||
#define xx(a, b, c...) { # a, b, c },
|
#define xx(a, b, c...) { # a, b, c },
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#undef xx
|
#undef xx
|
||||||
{ .name = NULL }
|
{ .name = NULL }
|
||||||
};
|
};
|
||||||
struct command commands[COMMAND_COUNT];
|
static struct command commands[COMMAND_COUNT];
|
||||||
|
|
||||||
#else /* MAN_PAGE_GENERATOR */
|
#else /* MAN_PAGE_GENERATOR */
|
||||||
|
|
||||||
@ -130,11 +130,11 @@ const struct lv_type *get_lv_type(int lvt_enum)
|
|||||||
|
|
||||||
/* array of pointers into opt_names[] that is sorted alphabetically (by long opt name) */
|
/* array of pointers into opt_names[] that is sorted alphabetically (by long opt name) */
|
||||||
|
|
||||||
struct opt_name *opt_names_alpha[ARG_COUNT + 1];
|
static struct opt_name *opt_names_alpha[ARG_COUNT + 1];
|
||||||
|
|
||||||
/* lvm_all is for recording options that are common for all lvm commands */
|
/* lvm_all is for recording options that are common for all lvm commands */
|
||||||
|
|
||||||
struct command lvm_all;
|
static struct command lvm_all;
|
||||||
|
|
||||||
/* saves OO_FOO lines (groups of optional options) to include in multiple defs */
|
/* saves OO_FOO lines (groups of optional options) to include in multiple defs */
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ extern struct command_name command_names[];
|
|||||||
* Table of commands (as defined in command-lines.in)
|
* Table of commands (as defined in command-lines.in)
|
||||||
*/
|
*/
|
||||||
struct command commands[COMMAND_COUNT];
|
struct command commands[COMMAND_COUNT];
|
||||||
struct command *commands_idx[COMMAND_COUNT];
|
static struct command *commands_idx[COMMAND_COUNT];
|
||||||
|
|
||||||
static struct cmdline_context _cmdline;
|
static struct cmdline_context _cmdline;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user