*/
#define DEF_REPORT_LEN (1U << 12) /* 4k zones per report (256k kzalloc) */
-static const char *type_text[] = {
+static const char *const type_text[] = {
"RESERVED",
"CONVENTIONAL",
"SEQ_WRITE_REQUIRED",
"SEQ_WRITE_PREFERRED",
};
-static const char *condition_str[] = {
+static const char *const condition_str[] = {
"nw", /* Not write pointer */
"em", /* Empty */
"oi", /* Implicitly opened */
ZONE_DEVICE,
};
-static char *zone_names[] = {
+static const char *const zone_names[] = {
[ZONE_DMA] = "DMA",
[ZONE_DMA32] = "DMA32",
[ZONE_NORMAL] = "Normal",
#include "lscpu.h"
-static const char *virt_types[] = {
+static const char *const virt_types[] = {
[VIRT_TYPE_NONE] = N_("none"),
[VIRT_TYPE_PARA] = N_("para"),
[VIRT_TYPE_FULL] = N_("full"),
[VIRT_TYPE_CONTAINER] = N_("container"),
};
-static const char *hv_vendors[] = {
+static const char *const hv_vendors[] = {
[VIRT_VENDOR_NONE] = NULL,
[VIRT_VENDOR_XEN] = "Xen",
[VIRT_VENDOR_KVM] = "KVM",
};
/* dispatching modes */
-static const char *disp_modes[] = {
+static const char *const disp_modes[] = {
[DISP_HORIZONTAL] = N_("horizontal"),
[DISP_VERTICAL] = N_("vertical")
};
COL_ZONES,
};
-static char *zone_names[] = {
+static const char *const zone_names[] = {
[ZONE_DMA] = "DMA",
[ZONE_DMA32] = "DMA32",
[ZONE_NORMAL] = "Normal",
LSNS_TYPE_TIME
};
-static char *ns_names[] = {
+static const char *const ns_names[] = {
/* Don't add LSNS_TYPE_UNKNOWN here.
* ARRAY_SIZE(ns_names) in struct lsns_process may not work.*/
[LSNS_TYPE_MNT] = "mnt",
#include "c.h"
#include "closestream.h"
-static const char *idtype[] = {
+static const char *const idtype[] = {
[PRIO_PROCESS] = N_("process ID"),
[PRIO_PGRP] = N_("process group ID"),
[PRIO_USER] = N_("user ID"),
ACT_LIST_OLD
};
-static char *rfkill_actions[] = {
+static const char *const rfkill_actions[] = {
[ACT_LIST] = "list",
[ACT_HELP] = "help",
[ACT_EVENT] = "event",
};
-static const char *rtcwake_mode_string[] = {
+static const char *const rtcwake_mode_string[] = {
[OFF_MODE] = "off",
[NO_MODE] = "no",
[ON_MODE] = "on",
*/
static const char *get_default_device(void)
{
- const char **p;
- static const char *devs[] = {
+ const char *const*p;
+ static const char *const devs[] = {
"/dev/watchdog0",
"/dev/watchdog",
NULL
MM_NUM_MIGRATED
};
-static const char *mm_stat_names[] = {
+static const char *const mm_stat_names[] = {
[MM_ORIG_DATA_SIZE] = "orig_data_size",
[MM_COMPR_DATA_SIZE] = "compr_data_size",
[MM_MEM_USED_TOTAL] = "mem_used_total",