diff --git a/etc/MAKEDEV.awk b/etc/MAKEDEV.awk index da45c644a549..79bba799fb5c 100644 --- a/etc/MAKEDEV.awk +++ b/etc/MAKEDEV.awk @@ -1,6 +1,6 @@ #!/usr/bin/awk - # -# $NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $ +# $NetBSD: MAKEDEV.awk,v 1.26.2.2 2020/06/20 16:19:43 martin Exp $ # # Copyright (c) 2003 The NetBSD Foundation, Inc. # All rights reserved. @@ -104,10 +104,33 @@ BEGIN { getline < cfgfile # blank line MDDEV = 0 # MD device targets while (getline < cfgfile) { + # + # Perform the same blk / chr subsitution that happens below. + # + md_deventry = $0 + if (match(md_deventry, /%[a-z0-9]*_(blk|chr)%/)) { + nam = substr(md_deventry, RSTART + 1, RLENGTH - 6); + typ = substr(md_deventry, RSTART + RLENGTH - 4, 3); + dev = "" + if (typ == "blk") { + if (nam in blk) { + dev = blk[nam]; + } + } else { + if (nam in chr) { + dev = chr[nam]; + } + } + if (dev != "") { + parsed = substr(md_deventry, 1, RSTART - 1) dev + md_deventry = substr(md_deventry, RSTART + RLENGTH) + } + md_deventry = parsed md_deventry + } if (MDDEV) - MDDEV = MDDEV "\n" $0 + MDDEV = MDDEV "\n" md_deventry else - MDDEV = $0 + MDDEV = md_deventry } close(cfgfile) @@ -225,7 +248,7 @@ BEGIN { print "# Generated from:" # MAKEDEV.awk (this script) RCS Id - ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $" + ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.2 2020/06/20 16:19:43 martin Exp $" gsub(/\$/, "", ARCSID) print "# " ARCSID diff --git a/etc/etc.cobalt/MAKEDEV.conf b/etc/etc.cobalt/MAKEDEV.conf index 06fa8e2ec9ff..72bfbe3ecbf8 100644 --- a/etc/etc.cobalt/MAKEDEV.conf +++ b/etc/etc.cobalt/MAKEDEV.conf @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.16 2018/09/23 09:20:58 maxv Exp $ +# $NetBSD: MAKEDEV.conf,v 1.16.2.1 2020/06/20 16:19:43 martin Exp $ all_md) makedev wd0 wd1 sd0 sd1 sd2 sd3 @@ -26,7 +26,9 @@ minimal) ;; lcdpanel) - mkdev lcdpanel0 c %lcdpanel_chr% 0 660 + mkdev lcdpanel0 c %lcdpanel_chr% 0 660 + # Support the legacy "panel0" name. + lndev lcdpanel0 panel0 ;; diff --git a/sys/arch/cobalt/conf/majors.cobalt b/sys/arch/cobalt/conf/majors.cobalt index 370ce22126b5..3395885b2a1b 100644 --- a/sys/arch/cobalt/conf/majors.cobalt +++ b/sys/arch/cobalt/conf/majors.cobalt @@ -1,4 +1,4 @@ -# $NetBSD: majors.cobalt,v 1.32 2019/01/28 02:28:57 dholland Exp $ +# $NetBSD: majors.cobalt,v 1.32.4.1 2020/06/20 16:19:43 martin Exp $ # # Device majors for cobalt # @@ -39,7 +39,7 @@ device-major ld char 27 block 10 ld device-major clockctl char 33 clockctl #device-major obsolete char 34 obsolete (systrace) device-major cgd char 35 block 11 cgd -device-major panel char 36 panel +device-major lcdpanel char 36 lcdpanel device-major ksyms char 37 ksyms device-major pci char 38 pci device-major zstty char 39 zstty