diff options
author | 2001-09-28 22:20:48 +0000 | |
---|---|---|
committer | 2001-09-28 22:20:48 +0000 | |
commit | 8cc037f3eca607485428b1bcadb34295cf3af084 (patch) | |
tree | 8a3122d99583e646c64ff6522342bfa70c900096 | |
parent | cold is now staticly initialized. (diff) | |
download | wireguard-openbsd-8cc037f3eca607485428b1bcadb34295cf3af084.tar.xz wireguard-openbsd-8cc037f3eca607485428b1bcadb34295cf3af084.zip |
Hack to work around bootpaths like:
bootpath: /pci@1f,4000/ide@3,0/ata@0,0/cmdk@0,0
The val[0] of ata appears to be the channel number, and cmdk is disk
(cmdk@channel,disk)
-rw-r--r-- | sys/arch/sparc64/sparc64/autoconf.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 497513fa678..0603e75fb6f 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.12 2001/09/26 20:21:04 jason Exp $ */ +/* $OpenBSD: autoconf.c,v 1.13 2001/09/28 22:20:48 jason Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -1455,6 +1455,7 @@ static struct { { "pci", BUSCLASS_PCI, "ppb" }, { "ide", BUSCLASS_PCI, "pciide" }, { "disk", BUSCLASS_NONE, "wd" }, + { "cmdk", BUSCLASS_NONE, "wd" }, { "network", BUSCLASS_NONE, "hme" }, { "SUNW,fas", BUSCLASS_NONE, "esp" }, { "SUNW,hme", BUSCLASS_NONE, "hme" }, @@ -1611,6 +1612,15 @@ device_register(dev, aux) bootpath_store(1, bp + 1); DPRINTF(ACDB_BOOTDEV, ("\t-- found bus controller %s\n", dev->dv_xname)); + if (strcmp(bp->name, "ide") == 0 && + strcmp((bp + 1)->name, "ata") == 0 && + strcmp((bp + 2)->name, "cmdk") == 0) { + if (((bp + 2)->val[0] == (bp + 1)->val[0]) && + ((bp + 1)->val[1] == 0)) { + (bp + 1)->dev = dev; + bootpath_store(1, bp + 2); + } + } return; } } else if (strcmp(dvname, "le") == 0 || |