diff options
| -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 7782f9188b6e2..9d3283cce035f 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++; } } } |
