mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
FreeBSD: fallback to /boot/ to look for zpool.cache
Up until now zpool.cache has always lived in /boot on FreeBSD. For the sake of compatibility fallback to /boot if zpool.cache isn't found in /etc/zfs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10720
This commit is contained in:
@@ -100,6 +100,10 @@ spa_config_load(void)
|
||||
|
||||
err = zfs_file_open(pathname, O_RDONLY, 0, &fp);
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
if (err)
|
||||
err = zfs_file_open(ZPOOL_CACHE_BOOT, O_RDONLY, 0, &fp);
|
||||
#endif
|
||||
kmem_free(pathname, MAXPATHLEN);
|
||||
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user