/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ZFS_PROP_H
#define _ZFS_PROP_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* For index types (e.g. compression and checksum), we want the numeric value
* in the kernel, but the string value in userland.
*/
typedef enum {
} zprop_type_t;
typedef enum {
/*
* ONETIME properties are a sort of conglomeration of READONLY
* and INHERIT. They can be set only during object creation,
* after that they are READONLY. If not explicitly set during
* creation, they can be inherited.
*/
} zprop_attr_t;
typedef struct zfs_index {
const char *pi_name;
typedef struct {
/* fs | vol | snap; or pool */
/* "zfs get" help message */
/* defining the possible values */
} zprop_desc_t;
/*
* zfs dataset property functions
*/
void zfs_prop_init(void);
zprop_desc_t *zfs_prop_get_table(void);
/*
* zpool property functions
*/
void zpool_prop_init(void);
zprop_desc_t *zpool_prop_get_table(void);
/*
* Common routines to initialize property tables
*/
const char *, zprop_attr_t, int, const char *, const char *,
void zprop_register_string(int, const char *, const char *,
zprop_attr_t attr, int, const char *, const char *);
const char *, const char *);
const char *, const char *, const zprop_index_t *);
int, const char *);
/*
* Common routines for zfs and zpool property management
*/
int zprop_name_to_prop(const char *, zfs_type_t);
const char *zprop_values(int, zfs_type_t);
#ifdef __cplusplus
}
#endif
#endif /* _ZFS_PROP_H */