static int probe_dm_tp(blkid_probe pr,
const struct blkid_idmag *mag __attribute__((__unused__)))
{
- const char *paths[] = {
+ const char * const paths[] = {
"/usr/local/sbin/dmsetup",
"/usr/sbin/dmsetup",
"/sbin/dmsetup"
/*
* ioctl topology values
*/
-static struct topology_val {
+static const struct topology_val {
long ioc;
size_t i;
for (i = 0; i < ARRAY_SIZE(topology_vals); i++) {
- struct topology_val *val = &topology_vals[i];
+ const struct topology_val *val = &topology_vals[i];
int rc = 1;
unsigned int data;
static int probe_lvm_tp(blkid_probe pr,
const struct blkid_idmag *mag __attribute__((__unused__)))
{
- const char *paths[] = {
+ const char * const paths[] = {
"/usr/local/sbin/lvdisplay",
"/usr/sbin/lvdisplay",
"/sbin/lvdisplay"
/*
* Sysfs topology values (since 2.6.31, May 2009).
*/
-static struct topology_val {
+static const struct topology_val {
/* /sys/dev/block/<maj>:<min>/<ATTR> */
const char *attr;
rc = 1; /* nothing (default) */
for (i = 0; i < ARRAY_SIZE(topology_vals); i++) {
- struct topology_val *val = &topology_vals[i];
+ const struct topology_val *val = &topology_vals[i];
int ok = ul_path_access(pc, F_OK, val->attr) == 0;
rc = 1; /* nothing */