xref: /illumos-gate/usr/src/common/zfs/zfs_prop.h (revision 91ebeef5)
1fa9e4066Sahrens /*
2fa9e4066Sahrens  * CDDL HEADER START
3fa9e4066Sahrens  *
4fa9e4066Sahrens  * The contents of this file are subject to the terms of the
5e9dbad6fSeschrock  * Common Development and Distribution License (the "License").
6e9dbad6fSeschrock  * You may not use this file except in compliance with the License.
7fa9e4066Sahrens  *
8fa9e4066Sahrens  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9fa9e4066Sahrens  * or http://www.opensolaris.org/os/licensing.
10fa9e4066Sahrens  * See the License for the specific language governing permissions
11fa9e4066Sahrens  * and limitations under the License.
12fa9e4066Sahrens  *
13fa9e4066Sahrens  * When distributing Covered Code, include this CDDL HEADER in each
14fa9e4066Sahrens  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15fa9e4066Sahrens  * If applicable, add the following below this CDDL HEADER, with the
16fa9e4066Sahrens  * fields enclosed by brackets "[]" replaced with your own identifying
17fa9e4066Sahrens  * information: Portions Copyright [yyyy] [name of copyright owner]
18fa9e4066Sahrens  *
19fa9e4066Sahrens  * CDDL HEADER END
20fa9e4066Sahrens  */
21fa9e4066Sahrens /*
223d7072f8Seschrock  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23fa9e4066Sahrens  * Use is subject to license terms.
24fa9e4066Sahrens  */
25fa9e4066Sahrens 
26fa9e4066Sahrens #ifndef	_ZFS_PROP_H
27fa9e4066Sahrens #define	_ZFS_PROP_H
28fa9e4066Sahrens 
29fa9e4066Sahrens #pragma ident	"%Z%%M%	%I%	%E% SMI"
30fa9e4066Sahrens 
31fa9e4066Sahrens #include <sys/fs/zfs.h>
32fa9e4066Sahrens #include <sys/types.h>
33fa9e4066Sahrens 
34fa9e4066Sahrens #ifdef	__cplusplus
35fa9e4066Sahrens extern "C" {
36fa9e4066Sahrens #endif
37fa9e4066Sahrens 
38101f5531Slling /*
39101f5531Slling  * For index types (e.g. compression and checksum), we want the numeric value
40101f5531Slling  * in the kernel, but the string value in userland.
41101f5531Slling  */
42fa9e4066Sahrens typedef enum {
43*91ebeef5Sahrens 	PROP_TYPE_NUMBER,	/* numeric value */
44*91ebeef5Sahrens 	PROP_TYPE_STRING,	/* string value */
45*91ebeef5Sahrens 	PROP_TYPE_BOOLEAN,	/* boolean value */
46*91ebeef5Sahrens 	PROP_TYPE_INDEX		/* numeric value indexed by string */
47fa9e4066Sahrens } zfs_proptype_t;
48fa9e4066Sahrens 
49fa9e4066Sahrens zfs_proptype_t zfs_prop_get_type(zfs_prop_t);
503d7072f8Seschrock zfs_proptype_t zpool_prop_get_type(zpool_prop_t);
51e9dbad6fSeschrock size_t zfs_prop_width(zfs_prop_t, boolean_t *);
52*91ebeef5Sahrens boolean_t zfs_prop_delegatable(zfs_prop_t prop);
53*91ebeef5Sahrens void zfs_prop_init(void);
54fa9e4066Sahrens 
55fa9e4066Sahrens #ifdef	__cplusplus
56fa9e4066Sahrens }
57fa9e4066Sahrens #endif
58fa9e4066Sahrens 
59fa9e4066Sahrens #endif	/* _ZFS_PROP_H */
60