diff options
author | grog <grog@FreeBSD.org> | 2003-08-15 04:36:53 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2003-08-15 04:36:53 +0000 |
commit | f7e1e299a6310dedbab79d2692231a64ded728ec (patch) | |
tree | a8436d8834923610c699a4b9e181f1742d7c6d05 /sys/dev/vinum | |
parent | 64bcd887504df3e6370dbe13c11140b4dcb78d76 (diff) | |
download | FreeBSD-src-f7e1e299a6310dedbab79d2692231a64ded728ec.zip FreeBSD-src-f7e1e299a6310dedbab79d2692231a64ded728ec.tar.gz |
vinum_scandisk:
Correctly handle additional disks without BIOS partition tables.
Previously, vinum_scandisk stopped scanning additional disks for
native partitions after any good partition was found. This applies
to all platforms, but was a particular problem on systems without
BIOS partition tables.
Submitted by: harti
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r-- | sys/dev/vinum/vinumio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index 7782f91..9d3283c 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -717,6 +717,7 @@ vinum_scandisk(char *devicename) int malloced; int partnamelen; /* length of partition name */ int drives; + int goodpart; /* good vinum drives on this disk */ malloced = 0; /* devicename not malloced */ if (devicename == NULL) { /* no devices specified, */ @@ -781,6 +782,7 @@ vinum_scandisk(char *devicename) memcpy(np, cp, ep - cp); /* put in name */ np += ep - cp; /* and point past */ + goodpart = 0; /* no partitions on this disk yet */ partnamelen = MAXPATHLEN + np - partname; /* remaining length in partition name */ #ifdef __i386__ /* first try the partition table */ @@ -804,6 +806,7 @@ vinum_scandisk(char *devicename) drivelist[gooddrives] = drive->driveno; /* keep the drive index */ drive->flags &= ~VF_NEWBORN; /* which is no longer newly born */ gooddrives++; + goodpart++; } } } @@ -813,7 +816,7 @@ vinum_scandisk(char *devicename) * If the machine doesn't have a BIOS * partition table, try normal devices. */ - if (gooddrives == 0) { /* didn't find anything, */ + if (goodpart == 0) { /* didn't find anything, */ for (part = 'a'; part < 'i'; part++) /* try the compatibility partition */ if (part != 'c') { /* don't do the c partition */ snprintf(np, @@ -832,6 +835,7 @@ vinum_scandisk(char *devicename) drivelist[gooddrives] = drive->driveno; /* keep the drive index */ drive->flags &= ~VF_NEWBORN; /* which is no longer newly born */ gooddrives++; + goodpart++; } } } |