/*
*
* 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 <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <alloca.h>
#include <limits.h>
#include <fm/topo_mod.h>
#include <sys/systeminfo.h>
#include <topo_method.h>
#include <topo_subr.h>
#include <legacy_hc.h>
topo_instance_t, topo_instance_t, void *, void *);
{ NULL }
};
int
{
/*
* Turn on module debugging output
*/
if (getenv("TOPOLEGACY_HCDEBUG"))
if (version != LEGACY_HC_VERSION)
return (-1); /* mod errno already set */
}
return (0);
}
void
{
}
/*ARGSUSED*/
int
{
return (0);
}
/*ARGSUSED*/
static void
{
}
/*
* Convert an input string to a URI escaped string and return the new string.
* RFC2396 Section 2.4 says that data must be escaped if it does not have a
* representation using an unreserved character, where an unreserved character
* is one that is either alphanumeric or one of the marks defined in S2.3.
*/
static size_t
{
const char *p;
char c, *q;
size_t n = 0;
if (s == NULL)
s = empty_str;
for (p = s; (c = *p) != '\0'; p++) {
n++; /* represent c as itself */
else
n += 3; /* represent c as escape */
}
return (n);
*q++ = c;
} else {
*q++ = '%';
}
}
q--; /* len is too small: truncate output string */
*q = '\0';
return (n);
}
static ssize_t
{
char *c;
char *escc;
int i;
return (0);
return (size);
}
/*ARGSUSED*/
static int
{
if (version > TOPO_METH_NVL2STR_VERSION)
}
}
}
return (0);
}