zfs_prop.h revision 168404
1168404Spjd/*
2168404Spjd * CDDL HEADER START
3168404Spjd *
4168404Spjd * The contents of this file are subject to the terms of the
5168404Spjd * Common Development and Distribution License (the "License").
6168404Spjd * You may not use this file except in compliance with the License.
7168404Spjd *
8168404Spjd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9168404Spjd * or http://www.opensolaris.org/os/licensing.
10168404Spjd * See the License for the specific language governing permissions
11168404Spjd * and limitations under the License.
12168404Spjd *
13168404Spjd * When distributing Covered Code, include this CDDL HEADER in each
14168404Spjd * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15168404Spjd * If applicable, add the following below this CDDL HEADER, with the
16168404Spjd * fields enclosed by brackets "[]" replaced with your own identifying
17168404Spjd * information: Portions Copyright [yyyy] [name of copyright owner]
18168404Spjd *
19168404Spjd * CDDL HEADER END
20168404Spjd */
21168404Spjd/*
22168404Spjd * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23168404Spjd * Use is subject to license terms.
24168404Spjd */
25168404Spjd
26168404Spjd#ifndef	_ZFS_PROP_H
27168404Spjd#define	_ZFS_PROP_H
28168404Spjd
29168404Spjd#pragma ident	"%Z%%M%	%I%	%E% SMI"
30168404Spjd
31168404Spjd#include <sys/fs/zfs.h>
32168404Spjd#include <sys/types.h>
33168404Spjd
34168404Spjd#ifdef	__cplusplus
35168404Spjdextern "C" {
36168404Spjd#endif
37168404Spjd
38168404Spjd/*
39168404Spjd * For index types (e.g. compression and checksum), we want the numeric value
40168404Spjd * in the kernel, but the string value in userland.
41168404Spjd */
42168404Spjdtypedef enum {
43168404Spjd	prop_type_number,	/* numeric value */
44168404Spjd	prop_type_string,	/* string value */
45168404Spjd	prop_type_boolean,	/* boolean value */
46168404Spjd	prop_type_index		/* numeric value indexed by string */
47168404Spjd} zfs_proptype_t;
48168404Spjd
49168404Spjdzfs_proptype_t zfs_prop_get_type(zfs_prop_t);
50168404Spjdsize_t zfs_prop_width(zfs_prop_t, boolean_t *);
51168404Spjd
52168404Spjd#ifdef	__cplusplus
53168404Spjd}
54168404Spjd#endif
55168404Spjd
56168404Spjd#endif	/* _ZFS_PROP_H */
57