summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-10-24 21:14:50 +0000
committerpjd <pjd@FreeBSD.org>2011-10-24 21:14:50 +0000
commit7f814b700d8ebd9d427f04ce0902705af1a9d625 (patch)
treec72e3c411813edfc145bedbe98797b87d21b108f /cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
parent036925291ef871d3375f7b7d4b0331d461df82a3 (diff)
downloadFreeBSD-src-7f814b700d8ebd9d427f04ce0902705af1a9d625.zip
FreeBSD-src-7f814b700d8ebd9d427f04ce0902705af1a9d625.tar.gz
Extend r226676 to allow rename without unmount even for file systems with
non-legacy mountpoints. It is better to be able to rename such file systems and let them be mounted in old places until next reboot than using live CD, etc. to rename with remount. This is implemented by adding -u option to 'zfs rename'. If file system's mountpoint property is set to 'legacy' or 'none', there is no need to specify -u. Update zfs(8) manual page to reflect this addition. MFC after: 2 weeks
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
index 1077958..1f226b5 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
@@ -518,7 +518,16 @@ extern int zfs_destroy_snaps(zfs_handle_t *, char *, boolean_t);
extern int zfs_clone(zfs_handle_t *, const char *, nvlist_t *);
extern int zfs_snapshot(libzfs_handle_t *, const char *, boolean_t, nvlist_t *);
extern int zfs_rollback(zfs_handle_t *, zfs_handle_t *, boolean_t);
-extern int zfs_rename(zfs_handle_t *, const char *, boolean_t);
+
+typedef struct renameflags {
+ /* recursive rename */
+ int recurse : 1;
+
+ /* don't unmount file systems */
+ int nounmount : 1;
+} renameflags_t;
+
+extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t flags);
typedef struct sendflags {
/* print informational messages (ie, -v was specified) */
OpenPOWER on IntegriCloud