dsl_prop.c revision fa9e4066f08beec538e775443c5be79dd423fcab
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/dsl_dataset.h>
#include <sys/dsl_prop.h>
#include "zfs_prop.h"
static int
{
return (ENOENT);
if (intsz != 1)
return (EOVERFLOW);
} else {
return (EOVERFLOW);
}
return (0);
}
static int
{
int err = 0;
if (setpoint)
setpoint[0] = '\0';
while (ddobj != 0) {
if (setpoint)
break;
}
}
return (err);
}
/*
* Register interest in the named property. We'll call the callback
* once to notify it of the current property value, and again each time
* the property changes, until this callback is unregistered.
*
* Return 0 on success, errno if the prop is not an integer value.
*/
int
{
int err;
err = 0;
}
if (err != 0) {
return (err);
}
/* Leave dataset open until this callback is unregistered */
return (0);
}
int
{
int err;
return (err);
}
int
{
const char *tail;
int err;
return (ENOENT);
return (ENOENT);
}
return (err);
}
/*
* Return 0 on success, ENOENT if ddname is invalid, EOVERFLOW if
* valuelen not big enough.
*/
int
{
}
/*
* Get the current property value. It may have changed by the time this
* function returns, so it is NOT safe to follow up with
* dsl_prop_register() and assume that the value has not changed in
* between.
*
* Return 0 on success, ENOENT if ddname is invalid.
*/
int
{
}
int
{
}
/*
* Unregister this callback. Return 0 on success, ENOENT if ddname is
* invalid, ENOMSG if no matching callback registered.
*/
int
{
break;
}
return (ENOMSG);
}
/* Clean up from dsl_prop_register */
return (0);
}
static void
{
int err;
if (!first) {
/*
* If the prop is set here, then this change is not
* being inherited here or below; stop the recursion.
*/
if (err == 0) {
return;
}
}
}
}
zap_cursor_advance(&zc)) {
/* XXX recursion could blow stack; esp. za! */
}
}
}
struct prop_set_arg {
const char *name;
int intsz;
int numints;
const void *buf;
};
static int
{
err = 0;
}
} else {
if (isint)
}
}
return (err);
}
int
{
int err;
struct prop_set_arg psa;
return (ENOENT);
return (err);
}