zpool_prop.c revision 2e4c998613148111f2fc5371085331ffb39122ff
/*
* 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 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/
#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 *
{
}
{
}
/*
* Returns true if this is a valid feature@ property.
*/
zpool_prop_feature(const char *name)
{
static const char *prefix = "feature@";
}
/*
* Returns true if this is a valid unsupported@ property.
*/
zpool_prop_unsupported(const char *name)
{
static const char *prefix = "unsupported@";
}
int
{
}
int
const char **string)
{
}
{
}
#ifndef _KERNEL
const char *
{
}
const char *
{
}
{
}
#endif