svn commit: r356877 - head/lib/libbe

Kyle Evans kevans at FreeBSD.org
Sun Jan 19 02:48:57 UTC 2020


Author: kevans
Date: Sun Jan 19 02:48:56 2020
New Revision: 356877
URL: https://svnweb.freebsd.org/changeset/base/356877

Log:
  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

Modified:
  head/lib/libbe/be_access.c

Modified: head/lib/libbe/be_access.c
==============================================================================
--- head/lib/libbe/be_access.c	Sun Jan 19 02:45:02 2020	(r356876)
+++ head/lib/libbe/be_access.c	Sun Jan 19 02:48:56 2020	(r356877)
@@ -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));


More information about the svn-src-all mailing list