config.c revision 6cb1ca52bfd0f546d1001d9204d8ab93039de44b
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * CDDL HEADER START
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * The contents of this file are subject to the terms of the
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * Common Development and Distribution License (the "License").
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * You may not use this file except in compliance with the License.
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * See the License for the specific language governing permissions
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * and limitations under the License.
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * When distributing Covered Code, include this CDDL HEADER in each
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * If applicable, add the following below this CDDL HEADER, with the
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * fields enclosed by brackets "[]" replaced with your own identifying
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * information: Portions Copyright [yyyy] [name of copyright owner]
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * CDDL HEADER END
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * Use is subject to license terms.
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim#pragma ident "%Z%%M% %I% %E% SMI"
ac88567a7a5bb7f01cf22cf366bc9d6203e24d7aHyon Kim * config.c -- system configuration cache module
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <strings.h>
#include "alloc.h"
#include "out.h"
#include "literals.h"
#include "stable.h"
#include "lut.h"
#include "tree.h"
#include "itree.h"
#include "ipath.h"
#include "ptree.h"
#include "eval.h"
#include "config.h"
#include "config_impl.h"
#include "fme.h"
#include "platform.h"
static const char *config_lastcomp;
static struct config *
retval->s = s;
return (retval);
struct config *
char svdigit;
int len;
int num;
int exists;
while (*path) {
path);
thiscom--;
if (add)
config_lastcomp = s;
exists = 0;
if (!exists) {
if (!add) {
return (NULL);
if (lastcp)
return (parent);
int num;
int exists;
exists = 0;
if (!exists) {
if (lastcp)
char *pv;
const char *ptr;
goto eftcfgs;
if (!*cfgstr)
cfgstr++;
cfgstr);
(void *)pv);
struct cfgdata *
config_snapshot(void)
return (rawcfg);
struct config *
struct config *
struct config *
static struct node *
const char *sname;
return (NULL);
return (tmpn);
struct node *
return (NULL);
return (np);
struct node *
return (NULL);
return (np);
if (offset)