diff options
author | dfr <dfr@FreeBSD.org> | 2008-11-19 16:39:01 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2008-11-19 16:39:01 +0000 |
commit | d6f289d4433bdf255fa2c6abca2ab24c322bf884 (patch) | |
tree | 0a4e9c8e0a75ca6fc34e64f38b47d5e60c52f174 /sys/boot/zfs | |
parent | a24417724cb96f3cb441f632dc3e87fb79a6e536 (diff) | |
download | FreeBSD-src-d6f289d4433bdf255fa2c6abca2ab24c322bf884.zip FreeBSD-src-d6f289d4433bdf255fa2c6abca2ab24c322bf884.tar.gz |
Add a GPT-aware variant of zfsboot which should be used in a similar manner
to gptboot, i.e. installed in a freebsd-boot partition using /sbin/gpart or
/sbin/gpt.
Tweak the /boot/loader ZFS support so that it can find ZFS pools that are
contained in GPT partitions.
Diffstat (limited to 'sys/boot/zfs')
-rw-r--r-- | sys/boot/zfs/zfs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/boot/zfs/zfs.c b/sys/boot/zfs/zfs.c index cf0bb9c..e5cfad6 100644 --- a/sys/boot/zfs/zfs.c +++ b/sys/boot/zfs/zfs.c @@ -414,10 +414,14 @@ zfs_dev_init(void) close(fd); for (slice = 1; slice <= 4; slice++) { - sprintf(devname, "disk%ds%d:", unit, slice); + sprintf(devname, "disk%dp%d:", unit, slice); fd = open(devname, O_RDONLY); - if (fd == -1) - continue; + if (fd == -1) { + sprintf(devname, "disk%ds%d:", unit, slice); + fd = open(devname, O_RDONLY); + if (fd == -1) + continue; + } if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) close(fd); } |