diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2022-09-02 20:06:57 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2022-09-02 20:06:57 +0000 |
commit | 0480d2ad8bcef1a71cd9df2d62518679d800bc78 (patch) | |
tree | 13472779310ee770fe03933432f3cb745968b93d /sys/arch/octeon | |
parent | 5c3b8919b72b59be79fac969c544203b65e7a4dd (diff) |
Constify nam2blk[], chrtoblktbl[] and octeon devmap[].
ok mpi@ millert@
Diffstat (limited to 'sys/arch/octeon')
-rw-r--r-- | sys/arch/octeon/octeon/autoconf.c | 8 | ||||
-rw-r--r-- | sys/arch/octeon/octeon/conf.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/octeon/octeon/autoconf.c b/sys/arch/octeon/octeon/autoconf.c index d9f401f51c9..620c939dcff 100644 --- a/sys/arch/octeon/octeon/autoconf.c +++ b/sys/arch/octeon/octeon/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.16 2019/07/12 03:03:48 visa Exp $ */ +/* $OpenBSD: autoconf.c,v 1.17 2022/09/02 20:06:56 miod Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. * @@ -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 *aux) } } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "sd", 0 }, { "vnd", 2 }, { "cd", 3 }, diff --git a/sys/arch/octeon/octeon/conf.c b/sys/arch/octeon/octeon/conf.c index d3dc9d1b88e..126723050c1 100644 --- a/sys/arch/octeon/octeon/conf.c +++ b/sys/arch/octeon/octeon/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.27 2021/11/11 10:03:09 claudio Exp $ */ +/* $OpenBSD: conf.c,v 1.28 2022/09/02 20:06:56 miod Exp $ */ /* * Copyright (c) 1992, 1993 @@ -283,7 +283,7 @@ getnulldev() } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /* VCHR VBLK */ /* 0 */ NODEV, /* 1 */ NODEV, @@ -310,7 +310,7 @@ int chrtoblktbl[] = { /* 22 */ 8 /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); #include <dev/cons.h> |