summaryrefslogtreecommitdiffstats
path: root/lib/libzfs/libzfs_dataset.c
diff options
context:
space:
mode:
authorslashdd <[email protected]>2016-09-20 13:07:58 -0400
committerBrian Behlendorf <[email protected]>2016-09-20 10:07:58 -0700
commit792517389fad5c495a2738b61c2e9c65dedaaa9a (patch)
tree5eef2ac0ecc1db47b3f11ec4ba12a97b6427e1b7 /lib/libzfs/libzfs_dataset.c
parent25e2ab16be74cb37934e6736a1dc10fd50a00c56 (diff)
Change /etc/mtab to /proc/self/mounts
Fix misleading error message: "The /dev/zfs device is missing and must be created.", if /etc/mtab is missing. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Eric Desrochers <[email protected]> Closes #4680 Closes #5029
Diffstat (limited to 'lib/libzfs/libzfs_dataset.c')
-rwxr-xr-xlib/libzfs/libzfs_dataset.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 3ac31ad1d..84fe71734 100755
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -1908,9 +1908,9 @@ zfs_unset_recvd_props_mode(zfs_handle_t *zhp, uint64_t *cookie)
* zfs_prop_get_int() are built using this interface.
*
* Certain properties can be overridden using 'mount -o'. In this case, scan
- * the contents of the /etc/mtab entry, searching for the appropriate options.
- * If they differ from the on-disk values, report the current values and mark
- * the source "temporary".
+ * the contents of the /proc/self/mounts entry, searching for the
+ * appropriate options. If they differ from the on-disk values, report the
+ * current values and mark the source "temporary".
*/
static int
get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
@@ -1981,8 +1981,9 @@ get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
/*
* Because looking up the mount options is potentially expensive
- * (iterating over all of /etc/mtab), we defer its calculation until
- * we're looking up a property which requires its presence.
+ * (iterating over all of /proc/self/mounts), we defer its
+ * calculation until we're looking up a property which requires
+ * its presence.
*/
if (!zhp->zfs_mntcheck &&
(mntopt_on != NULL || prop == ZFS_PROP_MOUNTED)) {