/*
* 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 (c) 2002-2003, Network Appliance, Inc. All rights reserved.
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*
* MODULE: dat_dr.c
*
* PURPOSE: dynamic registry implementation
*
* $Id: dat_dr.c,v 1.12 2003/08/20 14:28:40 hobie16 Exp $
*/
#include "dat_dr.h"
#include "dat_dictionary.h"
/*
*
* Global Variables
*
*/
/*
*
* External Functions
*
*/
/*
* Function: dat_dr_init
*/
dat_dr_init(void)
{
if (DAT_SUCCESS != status) {
return (status);
}
if (DAT_SUCCESS != status) {
return (status);
}
return (DAT_SUCCESS);
}
/*
* Function: dat_dr_fini
*/
dat_dr_fini(void)
{
if (DAT_SUCCESS != status) {
return (status);
}
if (DAT_SUCCESS != status) {
return (status);
}
return (DAT_SUCCESS);
}
/*
* Function: dat_dr_insert
*/
extern DAT_RETURN
{
goto bail;
}
dict_entry = NULL;
if (DAT_SUCCESS != status) {
goto bail;
}
info,
(DAT_DICTIONARY_DATA *) data);
bail:
if (DAT_SUCCESS != status) {
}
if (NULL != dict_entry) {
(void) dat_dictionary_entry_destroy(dict_entry);
}
}
return (status);
}
/*
* Function: dat_dr_remove
*/
extern DAT_RETURN
{
info,
(DAT_DICTIONARY_DATA *) &data);
if (DAT_SUCCESS != status) {
/* return status from dat_dictionary_search() */
goto bail;
}
goto bail;
}
dict_entry = NULL;
info,
(DAT_DICTIONARY_DATA *) &data);
if (DAT_SUCCESS != status) {
/* return status from dat_dictionary_remove() */
goto bail;
}
bail:
if (NULL != dict_entry) {
(void) dat_dictionary_entry_destroy(dict_entry);
}
return (status);
}
/*
* Function: dat_dr_provider_open
*/
extern DAT_RETURN
{
info,
(DAT_DICTIONARY_DATA *) &data);
if (DAT_SUCCESS == status) {
}
return (status);
}
/*
* Function: dat_dr_provider_close
*/
extern DAT_RETURN
{
info,
(DAT_DICTIONARY_DATA *) &data);
if (DAT_SUCCESS == status) {
}
return (status);
}
/*
* Function: dat_dr_size
*/
{
}
/*
* Function: dat_dr_list
*/
{
DAT_COUNT i;
/*
* The dictionary size may increase between the call to
* dat_dictionary_size() and dat_dictionary_enumerate().
* Therefore we loop until a successful enumeration is made.
*/
*entries_returned = 0;
for (;;) {
if (status != DAT_SUCCESS) {
goto bail;
}
if (array_size == 0) {
goto bail;
}
goto bail;
}
(DAT_DICTIONARY_DATA *) array,
if (DAT_SUCCESS == status) {
break;
} else {
array_size * sizeof (DAT_DR_ENTRY *));
continue;
}
}
for (i = 0; (i < max_to_return) && (i < array_size); i++) {
if (NULL == dat_provider_list[i]) {
goto bail;
}
}
*entries_returned = i;
bail:
}
return (status);
}
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 8
* End:
*/