Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/mii mii_knowndevs[] is de facto const, define it as ...



details:   https://anonhg.NetBSD.org/src/rev/701e87043800
branches:  trunk
changeset: 1012633:701e87043800
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue Aug 04 04:22:02 2020 +0000

description:
mii_knowndevs[] is de facto const, define it as such.

This time for real.  On my first try I did it in the generated
miidevs_data.h file.

diffstat:

 sys/dev/mii/devlist2h.awk |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 978c4bdb6abf -r 701e87043800 sys/dev/mii/devlist2h.awk
--- a/sys/dev/mii/devlist2h.awk Tue Aug 04 03:00:47 2020 +0000
+++ b/sys/dev/mii/devlist2h.awk Tue Aug 04 04:22:02 2020 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/awk -f
-#      $NetBSD: devlist2h.awk,v 1.10 2019/12/02 21:24:50 uwe Exp $
+#      $NetBSD: devlist2h.awk,v 1.11 2020/08/04 04:22:02 uwe Exp $
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -147,7 +147,7 @@
                printf("        int model;\n") > dfile
                printf("        const char *descr;\n") > dfile
                printf("};\n") > dfile
-               printf("struct mii_knowndev mii_knowndevs[] = {\n") > dfile
+               printf("const struct mii_knowndev mii_knowndevs[] = {\n") > dfile
                firstdone = 1
        }
 



Home | Main Index | Thread Index | Old Index