aboutsummaryrefslogtreecommitdiff
path: root/lib/libbe/be_access.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-01-19 02:48:56 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-01-19 02:48:56 +0000
commitc7a19fd70a35ae0591b185bd7216a328f6bfe848 (patch)
tree2c7cc8f9efc15393d7fe8d08d611c6ffa2bdbf29 /lib/libbe/be_access.c
parent149d640cfa2e5db2850493c3a57c2b3ed7ab81f3 (diff)
downloadsrc-c7a19fd70a35ae0591b185bd7216a328f6bfe848.tar.gz
src-c7a19fd70a35ae0591b185bd7216a328f6bfe848.zip
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
Notes
Notes: svn path=/head/; revision=356877
Diffstat (limited to 'lib/libbe/be_access.c')
-rw-r--r--lib/libbe/be_access.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libbe/be_access.c b/lib/libbe/be_access.c
index 72ee48b1ca7a..47fbd63c87b0 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));