summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2012-08-05 14:48:28 +0000
committerae <ae@FreeBSD.org>2012-08-05 14:48:28 +0000
commitce1cae970c8f58726e122d9a5135fd8010fc6733 (patch)
tree5b7c1c92b8440f342ce74666a012bcf7d9f1b54d /sys/boot/i386
parentd8ef1d62b66279995de94de2c68c501fc44561f6 (diff)
downloadFreeBSD-src-ce1cae970c8f58726e122d9a5135fd8010fc6733.zip
FreeBSD-src-ce1cae970c8f58726e122d9a5135fd8010fc6733.tar.gz
Teach the ZFS use new partitions API when probing.
Note: now ZFS does probe only for partitions with type "freebsd-zfs" and "freebsd".
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/loader/main.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/boot/i386/loader/main.c b/sys/boot/i386/loader/main.c
index 08cf16b..143241b 100644
--- a/sys/boot/i386/loader/main.c
+++ b/sys/boot/i386/loader/main.c
@@ -356,25 +356,17 @@ static void
i386_zfs_probe(void)
{
char devname[32];
- int unit, slice;
+ int unit;
/*
* Open all the disks we can find and see if we can reconstruct
- * ZFS pools from them. Bogusly assumes that the disks are named
- * diskN, diskNpM or diskNsM.
+ * ZFS pools from them.
*/
for (unit = 0; unit < MAXBDDEV; unit++) {
+ if (bd_unit2bios(unit) == -1)
+ break;
sprintf(devname, "disk%d:", unit);
- if (zfs_probe_dev(devname, NULL) == ENXIO)
- continue;
- for (slice = 1; slice <= 128; slice++) {
- sprintf(devname, "disk%dp%d:", unit, slice);
- zfs_probe_dev(devname, NULL);
- }
- for (slice = 1; slice <= 4; slice++) {
- sprintf(devname, "disk%ds%d:", unit, slice);
- zfs_probe_dev(devname, NULL);
- }
+ zfs_probe_dev(devname, NULL);
}
}
#endif
OpenPOWER on IntegriCloud