Constify nam2blk[] and chrtoblktbl[], these are never modified at runtime. Plus an octeon bonus: devmap[].
Index: sys/arch/alpha/alpha/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/alpha/alpha/autoconf.c,v retrieving revision 1.38 diff -u -p -u -p -r1.38 autoconf.c --- sys/arch/alpha/alpha/autoconf.c 27 Jan 2018 22:55:23 -0000 1.38 +++ sys/arch/alpha/alpha/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -220,7 +220,7 @@ device_register(dev, aux) (*platform.device_register)(dev, aux); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 0 }, { "cd", 3 }, { "fd", 4 }, Index: sys/arch/alpha/alpha/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/alpha/alpha/conf.c,v retrieving revision 1.90 diff -u -p -u -p -r1.90 conf.c --- sys/arch/alpha/alpha/conf.c 11 Nov 2021 10:03:08 -0000 1.90 +++ sys/arch/alpha/alpha/conf.c 2 Sep 2022 14:39:45 -0000 @@ -252,7 +252,7 @@ getnulldev() return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -293,4 +293,4 @@ int chrtoblktbl[] = { /* 36 */ 0, /* 37 */ 4, /* fd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); Index: sys/arch/amd64/amd64/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/amd64/amd64/autoconf.c,v retrieving revision 1.53 diff -u -p -u -p -r1.53 autoconf.c --- sys/arch/amd64/amd64/autoconf.c 11 Jan 2019 06:25:06 -0000 1.53 +++ sys/arch/amd64/amd64/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -223,7 +223,7 @@ diskconf(void) #endif /* HIBERNATE */ } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 0 }, { "fd", 2 }, { "sd", 4 }, Index: sys/arch/amd64/amd64/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/amd64/amd64/conf.c,v retrieving revision 1.75 diff -u -p -u -p -r1.75 conf.c --- sys/arch/amd64/amd64/conf.c 28 Jun 2022 14:43:50 -0000 1.75 +++ sys/arch/amd64/amd64/conf.c 2 Sep 2022 14:39:45 -0000 @@ -331,7 +331,7 @@ getnulldev(void) return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -383,7 +383,7 @@ int chrtoblktbl[] = { /* 47 */ 17, /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); /* * In order to map BSD bdev numbers of disks to their BIOS equivalents Index: sys/arch/arm/arm/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/arm/arm/conf.c,v retrieving revision 1.58 diff -u -p -u -p -r1.58 conf.c --- sys/arch/arm/arm/conf.c 11 Nov 2021 10:03:08 -0000 1.58 +++ sys/arch/arm/arm/conf.c 2 Sep 2022 14:39:45 -0000 @@ -415,7 +415,7 @@ iszerodev(dev_t dev) } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -445,7 +445,7 @@ int chrtoblktbl[] = { /* 25 */ NODEV, /* 26 */ 26, /* cd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); dev_t getnulldev(void) Index: sys/arch/arm64/arm64/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/arm64/arm64/autoconf.c,v retrieving revision 1.12 diff -u -p -u -p -r1.12 autoconf.c --- sys/arch/arm64/arm64/autoconf.c 21 Feb 2021 14:55:16 -0000 1.12 +++ sys/arch/arm64/arm64/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -109,7 +109,7 @@ device_register(struct device *dev, void { } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 0 }, { "sd", 4 }, { "cd", 6 }, Index: sys/arch/arm64/arm64/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/arm64/arm64/conf.c,v retrieving revision 1.19 diff -u -p -u -p -r1.19 conf.c --- sys/arch/arm64/arm64/conf.c 11 Nov 2021 10:03:08 -0000 1.19 +++ sys/arch/arm64/arm64/conf.c 2 Sep 2022 14:39:45 -0000 @@ -273,7 +273,7 @@ getnulldev(void) return makedev(CMAJ_MM, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -325,7 +325,7 @@ int chrtoblktbl[] = { /* 47 */ 17, /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); /* * In order to map BSD bdev numbers of disks to their BIOS equivalents Index: sys/arch/armv7/armv7/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/armv7/armv7/autoconf.c,v retrieving revision 1.10 diff -u -p -u -p -r1.10 autoconf.c --- sys/arch/armv7/armv7/autoconf.c 25 Mar 2021 04:12:01 -0000 1.10 +++ sys/arch/armv7/armv7/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -145,7 +145,7 @@ diskconf(void) dumpconf(); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 16 }, { "rd", 18 }, { "vnd", 19 }, Index: sys/arch/hppa/hppa/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/hppa/hppa/autoconf.c,v retrieving revision 1.62 diff -u -p -u -p -r1.62 autoconf.c --- sys/arch/hppa/hppa/autoconf.c 27 Jan 2018 22:55:23 -0000 1.62 +++ sys/arch/hppa/hppa/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -511,7 +511,7 @@ diskconf(void) dumpconf(); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "vnd", 2 }, { "rd", 3 }, { "sd", 4 }, Index: sys/arch/hppa/hppa/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/hppa/hppa/conf.c,v retrieving revision 1.73 diff -u -p -u -p -r1.73 conf.c --- sys/arch/hppa/hppa/conf.c 20 Apr 2022 14:21:56 -0000 1.73 +++ sys/arch/hppa/hppa/conf.c 2 Sep 2022 14:39:45 -0000 @@ -208,7 +208,7 @@ int mem_no = 2; /* major device number */ dev_t swapdev = makedev(0, 0); -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -251,7 +251,7 @@ int chrtoblktbl[] = { /* 38 */ NODEV, /* 39 */ 8, /* wd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); /* * Returns true if dev is /dev/zero. Index: sys/arch/i386/i386/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/i386/i386/autoconf.c,v retrieving revision 1.106 diff -u -p -u -p -r1.106 autoconf.c --- sys/arch/i386/i386/autoconf.c 8 Dec 2019 12:25:30 -0000 1.106 +++ sys/arch/i386/i386/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -260,7 +260,7 @@ diskconf(void) #endif /* HIBERNATE */ } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 0 }, { "fd", 2 }, { "sd", 4 }, Index: sys/arch/i386/i386/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/i386/i386/conf.c,v retrieving revision 1.173 diff -u -p -u -p -r1.173 conf.c --- sys/arch/i386/i386/conf.c 28 Jun 2022 14:43:50 -0000 1.173 +++ sys/arch/i386/i386/conf.c 2 Sep 2022 14:39:45 -0000 @@ -329,7 +329,7 @@ getnulldev(void) return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -380,7 +380,7 @@ int chrtoblktbl[] = { /* 46 */ NODEV, /* 47 */ 17, /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); /* * In order to map BSD bdev numbers of disks to their BIOS equivalents Index: sys/arch/landisk/landisk/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/landisk/landisk/autoconf.c,v retrieving revision 1.12 diff -u -p -u -p -r1.12 autoconf.c --- sys/arch/landisk/landisk/autoconf.c 27 Jan 2018 22:55:23 -0000 1.12 +++ sys/arch/landisk/landisk/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -73,7 +73,7 @@ diskconf(void) dumpconf(); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 16 }, { "rd", 18 }, { "vnd", 19 }, Index: sys/arch/landisk/landisk/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/landisk/landisk/conf.c,v retrieving revision 1.44 diff -u -p -u -p -r1.44 conf.c --- sys/arch/landisk/landisk/conf.c 11 Nov 2021 10:03:09 -0000 1.44 +++ sys/arch/landisk/landisk/conf.c 2 Sep 2022 14:39:45 -0000 @@ -397,7 +397,7 @@ iszerodev(dev) } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -427,7 +427,7 @@ int chrtoblktbl[] = { /* 25 */ NODEV, /* 26 */ 26, /* cd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); dev_t Index: sys/arch/loongson/loongson/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/loongson/loongson/autoconf.c,v retrieving revision 1.10 diff -u -p -u -p -r1.10 autoconf.c --- sys/arch/loongson/loongson/autoconf.c 20 Apr 2018 14:08:12 -0000 1.10 +++ sys/arch/loongson/loongson/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -149,7 +149,7 @@ device_register(struct device *dev, void (*sys_platform->device_register)(dev, aux); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "sd", 0 }, { "vnd", 2 }, { "cd", 3 }, Index: sys/arch/loongson/loongson/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/loongson/loongson/conf.c,v retrieving revision 1.31 diff -u -p -u -p -r1.31 conf.c --- sys/arch/loongson/loongson/conf.c 11 Nov 2021 10:03:09 -0000 1.31 +++ sys/arch/loongson/loongson/conf.c 2 Sep 2022 14:39:45 -0000 @@ -276,7 +276,7 @@ getnulldev() } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /* VCHR VBLK */ /* 0 */ NODEV, /* 1 */ NODEV, @@ -303,7 +303,7 @@ int chrtoblktbl[] = { /* 22 */ 8 /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); #include <dev/cons.h> Index: sys/arch/luna88k/luna88k/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/luna88k/luna88k/autoconf.c,v retrieving revision 1.25 diff -u -p -u -p -r1.25 autoconf.c --- sys/arch/luna88k/luna88k/autoconf.c 13 Aug 2022 06:44:48 -0000 1.25 +++ sys/arch/luna88k/luna88k/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -175,7 +175,7 @@ device_register(struct device *dev, void } } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "sd", 4 }, { "cd", 6 }, { "rd", 7 }, Index: sys/arch/luna88k/luna88k/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/luna88k/luna88k/conf.c,v retrieving revision 1.35 diff -u -p -u -p -r1.35 conf.c --- sys/arch/luna88k/luna88k/conf.c 11 Nov 2021 10:03:09 -0000 1.35 +++ sys/arch/luna88k/luna88k/conf.c 2 Sep 2022 14:39:45 -0000 @@ -205,7 +205,7 @@ getnulldev() return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -228,4 +228,4 @@ int chrtoblktbl[] = { /* 18 */ 7, /* rd */ /* 19 */ 8, /* vnd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); Index: sys/arch/macppc/macppc/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/macppc/macppc/autoconf.c,v retrieving revision 1.46 diff -u -p -u -p -r1.46 autoconf.c --- sys/arch/macppc/macppc/autoconf.c 3 Sep 2019 17:51:52 -0000 1.46 +++ sys/arch/macppc/macppc/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -280,7 +280,7 @@ diskconf(void) dumpconf(); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 0 }, { "sd", 2 }, { "cd", 3 }, Index: sys/arch/macppc/macppc/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/macppc/macppc/conf.c,v retrieving revision 1.74 diff -u -p -u -p -r1.74 conf.c --- sys/arch/macppc/macppc/conf.c 11 Nov 2021 10:03:09 -0000 1.74 +++ sys/arch/macppc/macppc/conf.c 2 Sep 2022 14:39:45 -0000 @@ -267,7 +267,7 @@ getnulldev(void) return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -290,7 +290,7 @@ int chrtoblktbl[] = { /* 18 */ NODEV, /* 19 */ 14, /* vnd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); #include <dev/cons.h> Index: sys/arch/octeon/octeon/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/octeon/octeon/autoconf.c,v retrieving revision 1.16 diff -u -p -u -p -r1.16 autoconf.c --- sys/arch/octeon/octeon/autoconf.c 12 Jul 2019 03:03:48 -0000 1.16 +++ sys/arch/octeon/octeon/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -56,14 +56,14 @@ struct devmap { enum devclass findtype(void) { - static struct devmap devmap[] = { + static const struct devmap devmap[] = { { "wd", DV_DISK }, { "sd", DV_DISK }, { "octcf", DV_DISK }, { "amdcf", DV_DISK }, { NULL, DV_IFNET } }; - struct devmap *dp = &devmap[0]; + const struct devmap *dp = &devmap[0]; if (strlen(bootdev) < 2) return DV_DISK; @@ -166,7 +166,7 @@ device_register(struct device *dev, void } } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "sd", 0 }, { "vnd", 2 }, { "cd", 3 }, Index: sys/arch/octeon/octeon/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/octeon/octeon/conf.c,v retrieving revision 1.27 diff -u -p -u -p -r1.27 conf.c --- sys/arch/octeon/octeon/conf.c 11 Nov 2021 10:03:09 -0000 1.27 +++ sys/arch/octeon/octeon/conf.c 2 Sep 2022 14:39:45 -0000 @@ -283,7 +282,7 @@ getnulldev() } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /* VCHR VBLK */ /* 0 */ NODEV, /* 1 */ NODEV, @@ -310,7 +309,7 @@ int chrtoblktbl[] = { /* 22 */ 8 /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); #include <dev/cons.h> Index: sys/arch/powerpc64/powerpc64/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/powerpc64/powerpc64/autoconf.c,v retrieving revision 1.7 diff -u -p -u -p -r1.7 autoconf.c --- sys/arch/powerpc64/powerpc64/autoconf.c 31 Oct 2020 17:57:53 -0000 1.7 +++ sys/arch/powerpc64/powerpc64/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -74,7 +74,7 @@ device_register(struct device *dev, void { } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "vnd", 1 }, { "rd", 2 }, { "sd", 3 }, Index: sys/arch/powerpc64/powerpc64/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/powerpc64/powerpc64/conf.c,v retrieving revision 1.13 diff -u -p -u -p -r1.13 conf.c --- sys/arch/powerpc64/powerpc64/conf.c 11 Nov 2021 10:03:09 -0000 1.13 +++ sys/arch/powerpc64/powerpc64/conf.c 2 Sep 2022 14:39:45 -0000 @@ -233,7 +233,7 @@ getnulldev(void) return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -264,4 +264,4 @@ int chrtoblktbl[] = { /* 26 */ 3, /* sd */ /* 27 */ 4, /* cd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); Index: sys/arch/riscv64/riscv64/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/riscv64/riscv64/autoconf.c,v retrieving revision 1.4 diff -u -p -u -p -r1.4 autoconf.c --- sys/arch/riscv64/riscv64/autoconf.c 14 May 2021 06:48:52 -0000 1.4 +++ sys/arch/riscv64/riscv64/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -97,7 +97,7 @@ device_register(struct device *dev, void { } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "wd", 0 }, { "sd", 4 }, { "cd", 6 }, Index: sys/arch/riscv64/riscv64/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/riscv64/riscv64/conf.c,v retrieving revision 1.14 diff -u -p -u -p -r1.14 conf.c --- sys/arch/riscv64/riscv64/conf.c 18 Feb 2022 10:51:43 -0000 1.14 +++ sys/arch/riscv64/riscv64/conf.c 2 Sep 2022 14:39:45 -0000 @@ -267,7 +267,7 @@ getnulldev(void) return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -319,7 +319,7 @@ int chrtoblktbl[] = { /* 47 */ 8, /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); /* * In order to map BSD bdev numbers of disks to their BIOS equivalents Index: sys/arch/sparc64/sparc64/autoconf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/sparc64/sparc64/autoconf.c,v retrieving revision 1.140 diff -u -p -u -p -r1.140 autoconf.c --- sys/arch/sparc64/sparc64/autoconf.c 24 Oct 2021 17:05:04 -0000 1.140 +++ sys/arch/sparc64/sparc64/autoconf.c 2 Sep 2022 14:39:45 -0000 @@ -1540,7 +1540,7 @@ nail_bootdev(struct device *dev, struct bootpath_store(1, NULL); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "rd", 5 }, { "sd", 7 }, { "vnd", 8 }, Index: sys/arch/sparc64/sparc64/conf.c =================================================================== RCS file: /OpenBSD/src/sys/arch/sparc64/sparc64/conf.c,v retrieving revision 1.86 diff -u -p -u -p -r1.86 conf.c --- sys/arch/sparc64/sparc64/conf.c 11 Nov 2021 10:03:09 -0000 1.86 +++ sys/arch/sparc64/sparc64/conf.c 2 Sep 2022 14:39:45 -0000 @@ -340,7 +340,7 @@ getnulldev(void) return makedev(mem_no, 2); } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, /* 1 */ NODEV, @@ -454,4 +454,4 @@ int chrtoblktbl[] = { /*109 */ NODEV, /*110 */ 8, /* vnd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); Index: sys/kern/subr_disk.c =================================================================== RCS file: /OpenBSD/src/sys/kern/subr_disk.c,v retrieving revision 1.255 diff -u -p -u -p -r1.255 subr_disk.c --- sys/kern/subr_disk.c 1 Sep 2022 13:45:27 -0000 1.255 +++ sys/kern/subr_disk.c 2 Sep 2022 14:39:45 -0000 @@ -1661,7 +1661,7 @@ gotswap: printf("\n"); } -extern struct nam2blk nam2blk[]; +extern const struct nam2blk nam2blk[]; int findblkmajor(struct device *dv) Index: sys/sys/conf.h =================================================================== RCS file: /OpenBSD/src/sys/sys/conf.h,v retrieving revision 1.158 diff -u -p -u -p -r1.158 conf.h --- sys/sys/conf.h 28 Jun 2022 14:43:50 -0000 1.158 +++ sys/sys/conf.h 2 Sep 2022 14:39:45 -0000 @@ -531,8 +531,8 @@ struct swdevt { #ifdef _KERNEL extern struct swdevt swdevt[]; -extern int chrtoblktbl[]; -extern int nchrtoblktbl; +extern const int chrtoblktbl[]; +extern const int nchrtoblktbl; struct bdevsw *bdevsw_lookup(dev_t); struct cdevsw *cdevsw_lookup(dev_t);