add rootfs on disk bootinfo case.

This commit is contained in:
nisimura 2008-04-05 04:05:06 +00:00
parent 654f9595de
commit 1976aeb78e
1 changed files with 11 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.16 2008/04/03 11:24:02 nisimura Exp $ */ /* $NetBSD: autoconf.c,v 1.17 2008/04/05 04:05:06 nisimura Exp $ */
/*- /*-
* Copyright (c) 1990 The Regents of the University of California. * Copyright (c) 1990 The Regents of the University of California.
@ -35,7 +35,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2008/04/03 11:24:02 nisimura Exp $"); __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2008/04/05 04:05:06 nisimura Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -68,7 +68,6 @@ cpu_configure()
genppc_cpu_configure(); genppc_cpu_configure();
#if 1 #if 1
{ {
int i;
uint8_t spd[64]; uint8_t spd[64];
extern int iic_seep_bootstrap_read(int, int, uint8_t *, size_t); extern int iic_seep_bootstrap_read(int, int, uint8_t *, size_t);
@ -101,18 +100,17 @@ device_register(struct device *dev, void *aux)
if (bi_rdev == NULL) if (bi_rdev == NULL)
return; /* no clue to determine */ return; /* no clue to determine */
if (dev->dv_class == DV_IFNET) { if (dev->dv_class == DV_IFNET
if (device_is_a(dev, bi_rdev->devname)) { && device_is_a(dev, bi_rdev->devname)) {
struct pci_attach_args *pa = aux; struct pci_attach_args *pa = aux;
unsigned tag = (unsigned)pa->pa_tag;
if (bi_rdev->cookie == tag) if (bi_rdev->cookie == pa->pa_tag)
booted_device = dev; booted_device = dev;
}
return;
} }
if (dev->dv_class == DV_DISK) { if (dev->dv_class == DV_DISK
/* XXX add diskboot case later XXX */ && device_is_a(dev, bi_rdev->devname)) {
booted_device = dev;
booted_partition = 0;
} }
} }