topo_2xml.c revision f41150baf74bdaf964ddfe42d865d3c2380b3623
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <strings.h>
#include <time.h>
#include <topo_parse.h>
#include <topo_prop.h>
#include <topo_tree.h>
#define XML_VERSION "1.0"
void
{
char buf[32];
}
void
{
}
}
void
{
}
}
void
{
}
static void
{
int err;
return;
case TOPO_TYPE_INT32: {
break;
}
case TOPO_TYPE_UINT32: {
break;
}
case TOPO_TYPE_INT64: {
(longlong_t)val);
break;
}
case TOPO_TYPE_UINT64: {
(u_longlong_t)val);
break;
}
case TOPO_TYPE_STRING: {
break;
}
case TOPO_TYPE_FMRI: {
else
return;
break;
}
case TOPO_TYPE_UINT32_ARRAY: {
if (nelem > 0) {
for (i = 1; i < nelem; i++) {
}
}
break;
}
}
}
static void
{
char version[INT32BUFSZ];
}
}
static void
{
return;
}
static void
{
char inst[INT32BUFSZ];
}
}
static int
{
/*
* Some enumerators create empty ranges: make sure there
* are real nodes before creating this range
*/
++create;
}
if (!create)
continue;
if (dependent) {
dependent = 0;
ret = 1;
}
}
}
return (ret);
}
static void
{
char *name;
else
NULL);
}
int
{
return (0);
}
}
return (-1);
}