/*
* 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
*/
/*
*/
/*
* FMD Topology Handling
*
* Fault manager scheme and module plug-ins may need access to the latest
* libtopo snapshot. Upon fmd initialization, a snapshot is taken and
* made available via fmd_fmri_topology() and fmd_hdl_topology(). Each
* of these routines returns a libtopo snapshot handle back to the caller.
* New snapshots are taken if and when a DR event causes the DR generation
* number to increase. The current snapshot is retained to assure consistency
* for modules still using older snapshots and the latest snapshot handle is
* returned to the caller.
*/
#include <fmd_alloc.h>
#include <fmd_error.h>
#include <fmd_subr.h>
#include <fmd_topo.h>
#include <fmd.h>
#include <string.h>
#include <unistd.h>
#include <fm/fmd_fmri.h>
static void
{
if (--ftp->ft_refcount == 0) {
}
}
void
fmd_topo_update(void)
{
int err;
char *id;
const char *name;
/*
* Update the topology snapshot.
*/
fmd_panic("failed to open topology library: %s",
topo_strerror(err));
fmd_panic("failed to get topology snapshot: %s",
topo_strerror(err));
/*
* We always keep a reference count on the last topo snapshot taken.
* Release the previous snapshot (if present), and set the current
* reference count to 1.
*/
}
fmd_topo_hold(void)
{
ftp->ft_refcount++;
return (ftp);
}
void
{
ftp->ft_refcount++;
}
void
{
}
void
{
break;
}
}
void
fmd_topo_init(void)
{
}
void
fmd_topo_fini(void)
{
}
}