/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*
* MODULE: dat_sr.c
*
* PURPOSE: static registry implementation
*
* $Id: dat_sr.c,v 1.12 2003/08/20 14:28:40 hobie16 Exp $
*/
#include "dat_sr.h"
#include "dat_dictionary.h"
#include "udat_sr_parser.h"
/*
*
* Global Variables
*
*/
/*
*
* External Functions
*
*/
/*
* Function: dat_sr_init
*/
dat_sr_init(void)
{
if (DAT_SUCCESS != status) {
return (status);
}
if (DAT_SUCCESS != status) {
return (status);
}
/*
* Since DAT allows providers to be loaded by either the static
* registry or explicitly through OS dependent methods, do not
* return an error if no providers are loaded via the static registry.
*/
(void) dat_sr_load();
return (DAT_SUCCESS);
}
/*
* Function: dat_sr_fini
*/
extern DAT_RETURN
dat_sr_fini(void)
{
if (DAT_SUCCESS != status) {
return (status);
}
if (DAT_SUCCESS != status) {
return (status);
}
return (DAT_SUCCESS);
}
/*
* Function: dat_sr_insert
*/
extern DAT_RETURN
{
goto bail;
}
goto bail;
}
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_sr_size
*/
extern DAT_RETURN
{
}
/*
* Function: dat_sr_list
*/
extern DAT_RETURN
{
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 (DAT_SUCCESS != status) {
goto bail;
}
if (array_size == 0) {
goto bail;
}
goto bail;
}
(DAT_DICTIONARY_DATA *) array,
if (DAT_SUCCESS == status) {
break;
} else {
array_size * sizeof (DAT_SR_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);
}
/*
* Function: dat_sr_provider_open
*/
extern DAT_RETURN
{
info,
(DAT_DICTIONARY_DATA *) &data);
if (DAT_SUCCESS == status) {
&data->lib_handle);
if (status == DAT_SUCCESS) {
} else {
"DAT Registry: static registry unable to "
goto bail;
}
}
} else {
}
}
bail:
return (status);
}
/*
* Function: dat_sr_provider_close
*/
extern DAT_RETURN
{
info,
(DAT_DICTIONARY_DATA *)&data);
if (DAT_SUCCESS == status) {
}
if (status == DAT_SUCCESS) {
}
} else {
}
}
return (status);
}