The nam2blk[] array contains MD mappings between block device names and
major device numbers.
This patch syncs the nam2blk entries with the bdevsw table, which
is the definitive list of block devices supported on an architecture.
This fixes the non-OpenBSD entries on arm64, removes obsolete
mentions of tape block devices, and cleans up various other
inconsistencies and omissions.
OK?
Index: arch/alpha/alpha/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/alpha/alpha/autoconf.c,v
retrieving revision 1.37
diff -u -p -r1.37 autoconf.c
--- arch/alpha/alpha/autoconf.c 5 Jun 2017 17:49:05 -0000 1.37
+++ arch/alpha/alpha/autoconf.c 27 Jan 2018 20:05:01 -0000
@@ -221,12 +221,11 @@ device_register(dev, aux)
}
struct nam2blk nam2blk[] = {
- { "st", 2 },
+ { "wd", 0 },
{ "cd", 3 },
{ "fd", 4 },
{ "rd", 6 },
{ "sd", 8 },
- { "wd", 0 },
{ "vnd", 9 },
{ NULL, -1 }
};
Index: arch/arm64/arm64/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/arm64/arm64/autoconf.c,v
retrieving revision 1.7
diff -u -p -r1.7 autoconf.c
--- arch/arm64/arm64/autoconf.c 20 Jan 2018 18:35:41 -0000 1.7
+++ arch/arm64/arm64/autoconf.c 27 Jan 2018 20:18:35 -0000
@@ -96,10 +96,10 @@ device_register(struct device *dev, void
}
struct nam2blk nam2blk[] = {
- { "sd", 4 },
- { "nbd", 20 },
- { "tmpfsrd", 19 },
- { "cd", 6},
- { "wd", 0 },
+ { "wd", 0 },
+ { "sd", 4 },
+ { "cd", 6 },
+ { "vnd", 14 },
+ { "rd", 17 },
{ NULL, -1 }
};
Index: arch/armv7/armv7/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/armv7/armv7/autoconf.c,v
retrieving revision 1.6
diff -u -p -r1.6 autoconf.c
--- arch/armv7/armv7/autoconf.c 8 Jun 2016 17:24:44 -0000 1.6
+++ arch/armv7/armv7/autoconf.c 27 Jan 2018 20:07:04 -0000
@@ -137,9 +137,10 @@ diskconf(void)
struct nam2blk nam2blk[] = {
{ "wd", 16 },
+ { "rd", 18 },
+ } "vnd", 19 },
{ "sd", 24 },
{ "cd", 26 },
- { "rd", 18 },
{ NULL, -1 }
};
Index: arch/hppa/hppa/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/hppa/hppa/autoconf.c,v
retrieving revision 1.61
diff -u -p -r1.61 autoconf.c
--- arch/hppa/hppa/autoconf.c 15 Sep 2014 19:08:21 -0000 1.61
+++ arch/hppa/hppa/autoconf.c 27 Jan 2018 20:08:40 -0000
@@ -512,12 +512,11 @@ diskconf(void)
}
struct nam2blk nam2blk[] = {
+ { "vnd", 2 },
{ "rd", 3 },
{ "sd", 4 },
- { "st", 5 },
{ "cd", 6 },
{ "fd", 7 },
{ "wd", 8 },
- { "vnd", 2 },
{ NULL, -1 }
};
Index: arch/i386/i386/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/autoconf.c,v
retrieving revision 1.103
diff -u -p -r1.103 autoconf.c
--- arch/i386/i386/autoconf.c 20 Jun 2017 21:05:46 -0000 1.103
+++ arch/i386/i386/autoconf.c 27 Jan 2018 20:09:27 -0000
@@ -270,7 +270,7 @@ struct nam2blk nam2blk[] = {
{ "fd", 2 },
{ "sd", 4 },
{ "cd", 6 },
- { "rd", 17 },
{ "vnd", 14 },
+ { "rd", 17 },
{ NULL, -1 }
};
Index: arch/landisk/landisk/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/landisk/landisk/autoconf.c,v
retrieving revision 1.11
diff -u -p -r1.11 autoconf.c
--- arch/landisk/landisk/autoconf.c 21 Jul 2008 04:35:54 -0000 1.11
+++ arch/landisk/landisk/autoconf.c 27 Jan 2018 20:10:36 -0000
@@ -76,7 +76,8 @@ diskconf(void)
struct nam2blk nam2blk[] = {
{ "wd", 16 },
{ "rd", 18 },
- { "sd", 24 },
{ "vnd", 19 },
+ { "sd", 24 },
+ { "cd", 26 },
{ NULL, -1 }
};
Index: arch/loongson/loongson/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/loongson/loongson/autoconf.c,v
retrieving revision 1.8
diff -u -p -r1.8 autoconf.c
--- arch/loongson/loongson/autoconf.c 8 Jun 2017 12:02:52 -0000 1.8
+++ arch/loongson/loongson/autoconf.c 27 Jan 2018 20:11:41 -0000
@@ -113,9 +113,9 @@ device_register(struct device *dev, void
struct nam2blk nam2blk[] = {
{ "sd", 0 },
+ { "vnd", 2 },
{ "cd", 3 },
{ "wd", 4 },
{ "rd", 8 },
- { "vnd", 2 },
{ NULL, -1 }
};
Index: arch/luna88k/luna88k/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/luna88k/luna88k/autoconf.c,v
retrieving revision 1.22
diff -u -p -r1.22 autoconf.c
--- arch/luna88k/luna88k/autoconf.c 3 Nov 2017 09:07:54 -0000 1.22
+++ arch/luna88k/luna88k/autoconf.c 27 Jan 2018 20:12:46 -0000
@@ -179,8 +179,9 @@ device_register(struct device *dev, void
struct nam2blk nam2blk[] = {
{ "sd", 4 },
- { "st", 5 },
+ { "cd", 6 },
{ "rd", 7 },
{ "vnd", 8 },
+ { "wd", 9 },
{ NULL, -1 }
};
Index: arch/macppc/macppc/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/macppc/macppc/autoconf.c,v
retrieving revision 1.44
diff -u -p -r1.44 autoconf.c
--- arch/macppc/macppc/autoconf.c 8 Jun 2016 17:24:44 -0000 1.44
+++ arch/macppc/macppc/autoconf.c 27 Jan 2018 20:13:55 -0000
@@ -283,7 +283,8 @@ diskconf(void)
struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "sd", 2 },
- { "rd", 17 },
+ { "cd", 3 },
{ "vnd", 14 },
+ { "rd", 17 },
{ NULL, -1 }
};
Index: arch/octeon/octeon/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/octeon/octeon/autoconf.c,v
retrieving revision 1.12
diff -u -p -r1.12 autoconf.c
--- arch/octeon/octeon/autoconf.c 8 Jun 2017 12:02:52 -0000 1.12
+++ arch/octeon/octeon/autoconf.c 27 Jan 2018 20:14:33 -0000
@@ -136,10 +136,10 @@ device_register(struct device *dev, void
struct nam2blk nam2blk[] = {
{ "sd", 0 },
+ { "vnd", 2 },
{ "cd", 3 },
{ "wd", 4 },
{ "rd", 8 },
- { "vnd", 2 },
{ "octcf", 15 },
{ "amdcf", 19 },
{ NULL, -1 }
Index: arch/sgi/sgi/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/sgi/sgi/autoconf.c,v
retrieving revision 1.42
diff -u -p -r1.42 autoconf.c
--- arch/sgi/sgi/autoconf.c 8 Jun 2017 12:02:52 -0000 1.42
+++ arch/sgi/sgi/autoconf.c 27 Jan 2018 20:15:33 -0000
@@ -727,9 +727,10 @@ dksc_device_register(struct device *dev,
struct nam2blk nam2blk[] = {
{ "sd", 0 },
+ { "vnd", 2 },
+ { "cd", 3 },
{ "wd", 4 },
{ "rd", 8 },
- { "vnd", 2 },
{ NULL, -1 }
};
Index: arch/socppc/socppc/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/socppc/socppc/autoconf.c,v
retrieving revision 1.6
diff -u -p -r1.6 autoconf.c
--- arch/socppc/socppc/autoconf.c 8 Jun 2016 17:24:44 -0000 1.6
+++ arch/socppc/socppc/autoconf.c 27 Jan 2018 20:16:21 -0000
@@ -67,7 +67,8 @@ diskconf(void)
struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "sd", 2 },
- { "rd", 17 },
+ { "cd", 3 },
{ "vnd", 14 },
+ { "rd", 17 },
{ NULL, -1 }
};
Index: arch/sparc64/sparc64/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc64/sparc64/autoconf.c,v
retrieving revision 1.130
diff -u -p -r1.130 autoconf.c
--- arch/sparc64/sparc64/autoconf.c 13 Dec 2017 00:12:03 -0000 1.130
+++ arch/sparc64/sparc64/autoconf.c 27 Jan 2018 20:17:11 -0000
@@ -1514,10 +1514,11 @@ nail_bootdev(struct device *dev, struct
}
struct nam2blk nam2blk[] = {
- { "sd", 7 },
{ "rd", 5 },
+ { "sd", 7 },
+ { "vnd", 8 },
{ "wd", 12 },
+ { "fd", 16 },
{ "cd", 18 },
- { "vnd", 8 },
{ NULL, -1 }
};
--
Christian "naddy" Weisgerber [email protected]