/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <libdevinfo.h>
#include <fm/topo_mod.h>
#include <pcibus.h>
#include <did.h>
#include "did_impl.h"
#include "did_props.h"
static void did_hash_destroy(did_hash_t *);
int
{
return (0);
} else {
return (-1);
}
}
void
{
return;
}
static uint64_t
{
/*
* A bit naughty here, we're aware that a di_info_t is a
* pointer to a struct. For our hashing, we want use the size
* of that struct, which we determine here, somewhat
* impolitely.
*/
if (key_divisor == 0)
key_divisor = sizeof (*key);
return (keyn / key_divisor);
}
static did_hash_t *
{
if (r == NULL) {
return (NULL);
}
r->dph_hashlen = REC_HASHLEN;
r->dph_hashlen * sizeof (did_t *));
return (NULL);
}
return (r);
}
static void
{
did_t *e, *n;
int idx;
return;
n = e->dp_next;
did_destroy(e);
e = n;
}
}
}
void
{
tab->dph_nelems++;
} else {
/*
* We should not be putting in a duplicate entry
*/
}
}
did_t *
{
did_t *e;
while (e != NULL) {
did_hold(e);
return (e);
}
e = e->dp_next;
}
return (NULL);
}