zpool_prop.c revision 83d7f9fe6bbb3e281a1ca55fdc5d1ec82ecc3e70
/*
* 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.
*/
#include <sys/zfs_ioctl.h>
#include "zfs_prop.h"
#if defined(_KERNEL)
#else
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#endif
zpool_prop_get_table(void)
{
return (zpool_prop_table);
}
void
zpool_prop_init(void)
{
static zprop_index_t boolean_table[] = {
{ "off", 0},
{ "on", 1},
{ NULL }
};
static zprop_index_t failuremode_table[] = {
{ "wait", ZIO_FAILURE_MODE_WAIT },
{ "continue", ZIO_FAILURE_MODE_CONTINUE },
{ "panic", ZIO_FAILURE_MODE_PANIC },
{ NULL }
};
/* string properties */
/* readonly number properties */
"DEDUP");
/* default number properties */
/* default index (boolean) properties */
/* default index properties */
/* hidden properties */
}
/*
* Given a property name and its type, returns the corresponding property ID.
*/
zpool_name_to_prop(const char *propname)
{
}
/*
* Given a pool property ID, returns the corresponding name.
* Assuming the pool propety ID is valid.
*/
const char *
{
}
{
}
{
}
const char *
{
}
{
}
int
{
}
int
const char **string)
{
}
{
}
#ifndef _KERNEL
const char *
{
}
const char *
{
}
{
}
#endif