From c9f9744f501f9cb1a6c6f8428bd091c123773919 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 3 May 2024 14:28:58 +0200 Subject: [PATCH] const: libdm cmd_data_v4 --- device_mapper/ioctl/libdm-iface.c | 2 +- device_mapper/ioctl/libdm-targets.h | 2 +- libdm/ioctl/libdm-iface.c | 2 +- libdm/ioctl/libdm-targets.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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]; };