/*
* 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.
*
* evnv.c -- eversholt specific nvpair manipulation functions
*
* this module provides the simulated fault management exercise.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include <libnvpair.h>
#include "evnv.h"
#include "out.h"
#define min(a, b) (((a) <= (b)) ? (a) : (b))
extern nv_alloc_t Eft_nv_hdl;
static void
{
while (depth-- > 0)
}
/*
* evnv_cmpnvl -- compare two asrus in their nvlist form
*/
int
{
/*
* an assumption here is that each list was constructed in the
* same order, which is a safe assumption since we built the
* list of ourself (well, libtopo did at any rate)
*/
int ret, i;
for (;;) {
return (0);
}
return (-1);
return (1);
return (ret);
/*
* We don't compare all possible types, just the
* ones we know are likely to actually be present
* in nvlists we've generated.
*/
switch (t1) {
case DATA_TYPE_NVLIST:
return (ret);
break;
case DATA_TYPE_NVLIST_ARRAY:
for (i = 0; i < m; i++) {
if ((ret =
return (ret);
la1++;
la2++;
}
return (-1);
return (1);
break;
case DATA_TYPE_STRING:
if (ret < 0)
else
return (ret);
}
break;
case DATA_TYPE_UINT64:
return (1);
return (-1);
break;
case DATA_TYPE_INT64:
return (1);
return (-1);
break;
case DATA_TYPE_UINT32:
return (1);
return (-1);
break;
case DATA_TYPE_INT32:
return (1);
return (-1);
break;
case DATA_TYPE_UINT16:
return (1);
return (-1);
break;
case DATA_TYPE_INT16:
return (1);
return (-1);
break;
case DATA_TYPE_UINT8:
return (1);
return (-1);
break;
case DATA_TYPE_INT8:
return (1);
return (-1);
break;
}
}
}
/*
* evnv_dupnvl -- duplicate a payload nvlist, keeping only the interesting stuff
*/
nvlist_t *
{
int nvret;
return (NULL);
return (retval);
}