mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
const: dmsetup long_options
This commit is contained in:
parent
8daa702880
commit
2b198cd874
@ -281,7 +281,7 @@ struct command;
|
|||||||
static const struct command *_selection_cmd = NULL; /* Command to run against each device select with -S */
|
static const struct command *_selection_cmd = NULL; /* Command to run against each device select with -S */
|
||||||
|
|
||||||
/* string names for stats object types */
|
/* string names for stats object types */
|
||||||
const char *_stats_types[] = {
|
const char * const _stats_types[] = {
|
||||||
"all",
|
"all",
|
||||||
"area",
|
"area",
|
||||||
"region",
|
"region",
|
||||||
@ -3914,7 +3914,7 @@ static int _dm_stats_object_type_disp(struct dm_report *rh,
|
|||||||
const struct dm_stats *dms = (const struct dm_stats *) data;
|
const struct dm_stats *dms = (const struct dm_stats *) data;
|
||||||
int type = dm_stats_current_object_type(dms);
|
int type = dm_stats_current_object_type(dms);
|
||||||
|
|
||||||
return dm_report_field_string(rh, field, (const char * const *) &_stats_types[type]);
|
return dm_report_field_string(rh, field, &_stats_types[type]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _dm_stats_precise_disp(struct dm_report *rh,
|
static int _dm_stats_precise_disp(struct dm_report *rh,
|
||||||
@ -6704,7 +6704,7 @@ static int _process_losetup_switches(const char *base, int *argcp, char ***argvp
|
|||||||
off_t offset = 0;
|
off_t offset = 0;
|
||||||
|
|
||||||
#ifdef HAVE_GETOPTLONG
|
#ifdef HAVE_GETOPTLONG
|
||||||
static struct option long_options[] = {
|
static const struct option _long_options[] = {
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@ -6712,7 +6712,7 @@ static int _process_losetup_switches(const char *base, int *argcp, char ***argvp
|
|||||||
optarg = (char*) "";
|
optarg = (char*) "";
|
||||||
optind = OPTIND_INIT;
|
optind = OPTIND_INIT;
|
||||||
while ((c = GETOPTLONG_FN(*argcp, *argvp, "ade:fo:v",
|
while ((c = GETOPTLONG_FN(*argcp, *argvp, "ade:fo:v",
|
||||||
long_options, NULL)) != -1 ) {
|
_long_options, NULL)) != -1 ) {
|
||||||
if (c == ':' || c == '?')
|
if (c == ':' || c == '?')
|
||||||
return_0;
|
return_0;
|
||||||
if (c == 'a')
|
if (c == 'a')
|
||||||
@ -6858,7 +6858,7 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
|
|||||||
int c, r, i;
|
int c, r, i;
|
||||||
|
|
||||||
#ifdef HAVE_GETOPTLONG
|
#ifdef HAVE_GETOPTLONG
|
||||||
static struct option long_options[] = {
|
static const struct option _long_options[] = {
|
||||||
{"addnodeoncreate", 0, 0, ADD_NODE_ON_CREATE_ARG},
|
{"addnodeoncreate", 0, 0, ADD_NODE_ON_CREATE_ARG},
|
||||||
{"addnodeonresume", 0, 0, ADD_NODE_ON_RESUME_ARG},
|
{"addnodeonresume", 0, 0, ADD_NODE_ON_RESUME_ARG},
|
||||||
{"alias", 1, 0, ALIAS_ARG},
|
{"alias", 1, 0, ALIAS_ARG},
|
||||||
@ -6941,7 +6941,7 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
|
|||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
struct option long_options;
|
struct option _long_options;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -7008,7 +7008,7 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
|
|||||||
optarg = (char*) "";
|
optarg = (char*) "";
|
||||||
optind = OPTIND_INIT;
|
optind = OPTIND_INIT;
|
||||||
while ((c = GETOPTLONG_FN(*argcp, *argvp, "cCfG:hj:m:M:no:O:rS:u:U:vy",
|
while ((c = GETOPTLONG_FN(*argcp, *argvp, "cCfG:hj:m:M:no:O:rS:u:U:vy",
|
||||||
long_options, NULL)) != -1) {
|
_long_options, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case ALIAS_ARG:
|
case ALIAS_ARG:
|
||||||
_switches[ALIAS_ARG]++;
|
_switches[ALIAS_ARG]++;
|
||||||
|
Loading…
Reference in New Issue
Block a user