diff --git a/device_mapper/ioctl/libdm-iface.c b/device_mapper/ioctl/libdm-iface.c index fa105761f..ba5ad382c 100644 --- a/device_mapper/ioctl/libdm-iface.c +++ b/device_mapper/ioctl/libdm-iface.c @@ -90,7 +90,7 @@ static unsigned _ioctl_buffer_double_factor = 0; const int _dm_compat = 0; /* *INDENT-OFF* */ -static struct cmd_data _cmd_data_v4[] = { +static const struct cmd_data _cmd_data_v4[] = { {"create", DM_DEV_CREATE, {4, 0, 0}}, {"reload", DM_TABLE_LOAD, {4, 0, 0}}, {"remove", DM_DEV_REMOVE, {4, 0, 0}}, diff --git a/device_mapper/ioctl/libdm-targets.h b/device_mapper/ioctl/libdm-targets.h index c853e22aa..53b02e17b 100644 --- a/device_mapper/ioctl/libdm-targets.h +++ b/device_mapper/ioctl/libdm-targets.h @@ -79,7 +79,7 @@ struct dm_task { }; struct cmd_data { - const char *name; + const char name[16]; const unsigned cmd; const int version[3]; }; diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index abc6d3379..d9ba0849a 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -89,7 +89,7 @@ static unsigned _ioctl_buffer_double_factor = 0; const int _dm_compat = 0; /* *INDENT-OFF* */ -static struct cmd_data _cmd_data_v4[] = { +static const struct cmd_data _cmd_data_v4[] = { {"create", DM_DEV_CREATE, {4, 0, 0}}, {"reload", DM_TABLE_LOAD, {4, 0, 0}}, {"remove", DM_DEV_REMOVE, {4, 0, 0}}, diff --git a/libdm/ioctl/libdm-targets.h b/libdm/ioctl/libdm-targets.h index 022b02c72..96b4e7d90 100644 --- a/libdm/ioctl/libdm-targets.h +++ b/libdm/ioctl/libdm-targets.h @@ -78,7 +78,7 @@ struct dm_task { }; struct cmd_data { - const char *name; + const char name[16]; const unsigned cmd; const int version[3]; };