From d06ebacebaa37b73118be4c7e872c9a2c67a504b Mon Sep 17 00:00:00 2001 From: kevans Date: Sun, 19 Jan 2020 02:48:56 +0000 Subject: [PATCH] libbe: use the new zfs_mount_at() More background is available in r356876, but this new interface is more portable across ZFS implementations and cleaner for what libbe is attempting to achieve anyways. MFC after: 3 days --- lib/libbe/be_access.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libbe/be_access.c b/lib/libbe/be_access.c index 72ee48b1ca7..47fbd63c87b 100644 --- a/lib/libbe/be_access.c +++ b/lib/libbe/be_access.c @@ -82,7 +82,6 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) char *mountpoint; char tmp[BE_MAXPATHLEN], zfs_mnt[BE_MAXPATHLEN]; struct be_mount_info *info; - char opt; info = (struct be_mount_info *)data; @@ -121,9 +120,7 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) mountpoint); } - opt = '\0'; - if ((err = zmount(zfs_get_name(zfs_hdl), tmp, info->mntflags, - __DECONST(char *, MNTTYPE_ZFS), NULL, 0, &opt, 1)) != 0) { + if ((err = zfs_mount_at(zfs_hdl, NULL, info->mntflags, tmp)) != 0) { switch (errno) { case ENAMETOOLONG: return (set_error(info->lbh, BE_ERR_PATHLEN)); -- 2.45.0