mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Use const char* const * for dm_regex_create()
Change API interface to accept even completely const array patterns. This should present no change for libdm users and allows to pass pattern arrays without cast to const char **.
This commit is contained in:
parent
ba96eb24fa
commit
303923fbf1
@ -1,5 +1,6 @@
|
||||
Version 1.02.60 -
|
||||
===================================
|
||||
Change dm_regex_create() API to accept const char * const *patterns.
|
||||
Add new dm_prepare_selinux_context fn to libdevmapper and use it throughout.
|
||||
Detect existence of new SELinux selabel interface during configure.
|
||||
|
||||
|
@ -543,7 +543,7 @@ static int _init_preferred_names(struct cmd_context *cmd)
|
||||
const struct config_node *cn;
|
||||
const struct config_value *v;
|
||||
struct dm_pool *scratch = NULL;
|
||||
char **regex;
|
||||
const char **regex;
|
||||
unsigned count = 0;
|
||||
int i, r = 0;
|
||||
|
||||
@ -583,7 +583,7 @@ static int _init_preferred_names(struct cmd_context *cmd)
|
||||
}
|
||||
|
||||
if (!(_cache.preferred_names_matcher =
|
||||
dm_regex_create(_cache.mem,(const char **) regex, count))) {
|
||||
dm_regex_create(_cache.mem, regex, count))) {
|
||||
log_error("Preferred device name pattern matcher creation failed.");
|
||||
goto out;
|
||||
}
|
||||
|
@ -1020,7 +1020,7 @@ struct dm_regex;
|
||||
* Initialise an array of num patterns for matching.
|
||||
* Uses memory from mem.
|
||||
*/
|
||||
struct dm_regex *dm_regex_create(struct dm_pool *mem, const char **patterns,
|
||||
struct dm_regex *dm_regex_create(struct dm_pool *mem, const char * const *patterns,
|
||||
unsigned num_patterns);
|
||||
|
||||
/*
|
||||
|
@ -310,7 +310,7 @@ static void _force_states(struct dm_regex *m)
|
||||
}
|
||||
}
|
||||
|
||||
struct dm_regex *dm_regex_create(struct dm_pool *mem, const char **patterns,
|
||||
struct dm_regex *dm_regex_create(struct dm_pool *mem, const char * const *patterns,
|
||||
unsigned num_patterns)
|
||||
{
|
||||
char *all, *ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user