/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <unistd.h>
#include <errno.h>
#include <libintl.h>
#include <libnvpair.h>
#include <thread.h>
#include <synch.h>
#include "libcpc.h"
#include "libcpc_impl.h"
/*
* Pack a request set into a buffer using libnvpair. Size of buffer is returned
* in buflen.
*/
char *
{
int i;
int j;
return (NULL);
}
== NULL) {
return (NULL);
}
i = 0;
goto nomem;
goto nomem;
goto nomem;
goto nomem;
goto nomem;
goto nomem;
if (nvlist_add_uint64(attrs,
goto nomem;
}
}
attrs) != 0) {
goto nomem;
}
}
i++;
}
goto nomem;
goto nomem;
0) != 0)
goto nomem;
nvlist_free(reqlist[i]);
return (buf);
if (reqlist[i] != 0)
nvlist_free(reqlist[i]);
}
return (NULL);
}
__cpc_strhash_alloc(void)
{
cpc_strhash_t *p;
return (NULL);
p->str = "";
return (p);
}
void
{
cpc_strhash_t *p = hash, *f;
while (p != NULL) {
f = p;
p = p->next;
free(f);
}
}
/*
* Insert a new key into the hash table.
*
* Returns 0 if key was unique and insert successful.
*
* Returns 1 if key was already in table and no insert took place.
*
* Returns -1 if out of memory.
*/
int
{
return (1);
}
return (-1);
/*
* The head node's current pointer must stay pointed at the first
* real node. We just inserted at the head.
*/
return (0);
}
char *
{
cpc_strhash_t *p;
return (p->str);
}
return (NULL);
}