dm: constify argument arrays
The arrays of 'struct dm_arg' are never modified by the device-mapper core, so constify them so that they are placed in .rodata. (Exception: the args array in dm-raid cannot be constified because it is allocated on the stack and modified.) Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:

committed by
Mike Snitzer

parent
3f2e539359
commit
5916a22b83
@@ -3041,7 +3041,7 @@ static int parse_pool_features(struct dm_arg_set *as, struct pool_features *pf,
|
||||
unsigned argc;
|
||||
const char *arg_name;
|
||||
|
||||
static struct dm_arg _args[] = {
|
||||
static const struct dm_arg _args[] = {
|
||||
{0, 4, "Invalid number of pool feature arguments"},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user