]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: zfs reader should not probe partitionless disks (UEFI case)
authortsoome <tsoome@FreeBSD.org>
Mon, 17 Dec 2018 07:43:29 +0000 (07:43 +0000)
committertsoome <tsoome@FreeBSD.org>
Mon, 17 Dec 2018 07:43:29 +0000 (07:43 +0000)
commit3e1a7746aea6fdb1e8d2c05b498bea3d1dc400b3
treedf3902d16dd8f055f7a6a962e6e0bc548d8a6543
parentac4ff55dd99ca79b99133b746c7696ff925d0587
loader: zfs reader should not probe partitionless disks (UEFI case)

With r342151 I did fix the BIOS version of zfs_probe_dev() from accessing
the whole disk, but the fix was not complete - we actually did not check
if the device name was really for whole disk. Since UEFI version
is only calling the zfs_probe_dev() with partitions and not with whole
disk, the UEFI loader was not able to find the zfs pools.

This update does correct the issue by calling archsw.arch_getdev() to
translate the device name back to dev_desc, and we have whole disk when both
partition and slice values are -1.

Reported by: alvisen_gmail.com
Differential Revision: https://reviews.freebsd.org/D18558
stand/libsa/zfs/zfs.c