diff options
author | hs24103 <none@none> | 2008-03-07 16:22:19 -0800 |
---|---|---|
committer | hs24103 <none@none> | 2008-03-07 16:22:19 -0800 |
commit | a227b7f4f323ad89c40a86c430a5e891504a8e8b (patch) | |
tree | feffee4e7263ebf790e1aaf86c8d86a209c191fe /usr/src/common/zfs/zfs_prop.c | |
parent | e9958a6c9e7427ed38c0957f2c72bde3068b0f3b (diff) | |
download | illumos-joyent-a227b7f4f323ad89c40a86c430a5e891504a8e8b.tar.gz |
PSARC 2008/168 Support for ZFS property value canmount=noauto
6661070 need canmount=noauto option for datasets to allow mount point to be set, but no mount done
6664570 need support for zfs canmount=noauto property in smf scripts
Diffstat (limited to 'usr/src/common/zfs/zfs_prop.c')
-rw-r--r-- | usr/src/common/zfs/zfs_prop.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr/src/common/zfs/zfs_prop.c b/usr/src/common/zfs/zfs_prop.c index 31559b3558..c65f441d89 100644 --- a/usr/src/common/zfs/zfs_prop.c +++ b/usr/src/common/zfs/zfs_prop.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -143,6 +143,13 @@ zfs_prop_init(void) { NULL } }; + static zprop_index_t canmount_table[] = { + { "off", ZFS_CANMOUNT_OFF }, + { "on", ZFS_CANMOUNT_ON }, + { "noauto", ZFS_CANMOUNT_NOAUTO }, + { NULL } + }; + /* inherit index properties */ register_index(ZFS_PROP_CHECKSUM, "checksum", ZIO_CHECKSUM_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, @@ -197,10 +204,9 @@ zfs_prop_init(void) register_index(ZFS_PROP_VERSION, "version", 0, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, "1 | 2 | 3 | current", "VERSION", version_table); - - /* default index (boolean) properties */ - register_index(ZFS_PROP_CANMOUNT, "canmount", 1, PROP_DEFAULT, - ZFS_TYPE_FILESYSTEM, "on | off", "CANMOUNT", boolean_table); + register_index(ZFS_PROP_CANMOUNT, "canmount", ZFS_CANMOUNT_ON, + PROP_DEFAULT, ZFS_TYPE_FILESYSTEM, "on | off | noauto", + "CANMOUNT", canmount_table); /* readonly index (boolean) properties */ register_index(ZFS_PROP_MOUNTED, "mounted", 0, PROP_READONLY, |