Fix a missing cases of devpp -> booted_device, partp -> booted_parition

This commit is contained in:
matt 2000-06-01 17:42:59 +00:00
parent 251afc5218
commit 33763f10cf
4 changed files with 18 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.75 2000/06/01 15:38:20 matt Exp $ */
/* $NetBSD: autoconf.c,v 1.76 2000/06/01 17:42:59 matt Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -42,7 +42,7 @@
#include <amiga/amiga/device.h>
#include <amiga/amiga/custom.h>
void findroot __P((struct device **, int *));
static void findroot __P((void));
void mbattach __P((struct device *, struct device *, void *));
int mbprint __P((void *, const char *));
int mbmatch __P((struct device *, struct cfdata *, void *));
@ -350,9 +350,7 @@ struct cfdriver *genericconf[] = {
};
void
findroot(devpp, partp)
struct device **devpp;
int *partp;
findroot(void)
{
struct disk *dkp;
struct partition *pp;
@ -411,16 +409,16 @@ findroot(devpp, partp)
pp->p_fstype != FS_SWAP))
continue;
if (pp->p_offset == boot_partition) {
if (*devpp == NULL) {
*devpp = devs[unit];
*partp = i;
if (booted_device == NULL) {
booted_device = devs[unit];
booted_partition = i;
} else
printf("Ambiguous boot device\n");
}
}
}
}
if (*devpp != NULL)
if (booted_device != NULL)
return; /* we found the boot device */
#endif
@ -459,8 +457,8 @@ findroot(devpp, partp)
pp = &dkp->dk_label->d_partitions[0];
if (pp->p_size != 0 && pp->p_fstype == FS_BSDFFS) {
*devpp = devs[unit];
*partp = 0;
booted_device = devs[unit];
booted_partition = 0;
return;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.4 2000/06/01 15:38:24 matt Exp $ */
/* $NetBSD: autoconf.c,v 1.5 2000/06/01 17:43:01 matt Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@ -67,8 +67,6 @@ extern int netboot;
void
findroot(void)
struct device **devpp;
int *partp;
{
struct device *dv;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.51 2000/06/01 17:35:42 matt Exp $ */
/* $NetBSD: autoconf.c,v 1.52 2000/06/01 17:43:02 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -451,8 +451,8 @@ found:
for (dv = alldevs.tqh_first; dv != NULL;
dv = dv->dv_list.tqe_next) {
if (strcmp(buf, dv->dv_xname) == 0) {
*devpp = dv;
*partp = part;
booted_device = dv;
booted_parition = part;
return;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.6 2000/06/01 15:38:26 matt Exp $ */
/* $NetBSD: autoconf.c,v 1.7 2000/06/01 17:43:03 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -252,9 +252,9 @@ findroot(void)
continue;
found:
if (*devpp) {
if (booted_device) {
printf("warning: double match for boot "
"device (%s, %s)\n", (*devpp)->dv_xname,
"device (%s, %s)\n", booted_device->dv_xname,
dv->dv_xname);
continue;
}
@ -287,8 +287,8 @@ found:
for (dv = alldevs.tqh_first; dv != NULL;
dv = dv->dv_list.tqe_next) {
if (strcmp(buf, dv->dv_xname) == 0) {
*devpp = dv;
*partp = part;
booted_device = dv;
booted_partition = part;
return;
}
}