zcommon: *_prop: make all zprop_index_t tables const

They're already static, and there's no point in them being R/W
and living outside .rodata

Reviewed-by: RageLtMan <rageltman@sempervictus>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12836
This commit is contained in:
наб
2021-12-16 22:26:04 +01:00
committed by GitHub
parent 92a9e8c618
commit 8fdc6f618c
2 changed files with 28 additions and 28 deletions
+4 -4
View File
@@ -52,13 +52,13 @@ zpool_prop_get_table(void)
void
zpool_prop_init(void)
{
static zprop_index_t boolean_table[] = {
static const zprop_index_t boolean_table[] = {
{ "off", 0},
{ "on", 1},
{ NULL }
};
static zprop_index_t failuremode_table[] = {
static const zprop_index_t failuremode_table[] = {
{ "wait", ZIO_FAILURE_MODE_WAIT },
{ "continue", ZIO_FAILURE_MODE_CONTINUE },
{ "panic", ZIO_FAILURE_MODE_PANIC },
@@ -271,12 +271,12 @@ vdev_prop_get_table(void)
void
vdev_prop_init(void)
{
static zprop_index_t boolean_table[] = {
static const zprop_index_t boolean_table[] = {
{ "off", 0},
{ "on", 1},
{ NULL }
};
static zprop_index_t boolean_na_table[] = {
static const zprop_index_t boolean_na_table[] = {
{ "off", 0},
{ "on", 1},
{ "-", 2}, /* ZPROP_BOOLEAN_NA */