dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / fm / modules / common / eversholt / config.h
blob3617694d01b187e96553edb00039f61bf6d06f5b
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
24 * config.h -- public definitions for config module
26 * this module supports management of system configuration information
30 #ifndef _EFT_CONFIG_H
31 #define _EFT_CONFIG_H
33 #include <sys/types.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 #include "tree.h"
40 #include "lut.h"
42 struct cfgdata {
43 int raw_refcnt;
45 * The begin field points to the first byte of raw
46 * configuration information and end to the byte past the last
47 * byte where configuration information may be stored.
48 * nextfree points to where the next string may be added.
50 char *begin;
51 char *end;
52 char *nextfree;
53 struct config *cooked;
54 struct lut *devcache;
55 struct lut *devidcache;
56 struct lut *tpcache;
57 struct lut *cpucache;
60 void structconfig_free(struct config *cp);
61 struct cfgdata *config_snapshot(void);
63 void config_cook(struct cfgdata *cdata);
64 void config_free(struct cfgdata *cdata);
66 struct config *config_lookup(struct config *croot, char *path, int add);
67 struct config *config_next(struct config *cp);
68 struct config *config_child(struct config *cp);
69 struct config *config_parent(struct config *cp);
71 const char *config_getprop(struct config *cp, const char *name);
72 void config_setprop(struct config *cp, const char *name, const char *val);
73 void config_getcompname(struct config *cp, char **name, int *inst);
75 int config_is_connected(struct node *np, struct config *croot,
76 struct evalue *valuep);
77 int config_is_type(struct node *np, struct config *croot,
78 struct evalue *valuep);
79 int config_is_on(struct node *np, struct config *croot, struct evalue *valuep);
80 int config_is_present(struct node *np, struct config *croot,
81 struct evalue *valuep);
83 void config_print(int flags, struct config *croot);
85 struct node *config_bydev_lookup(struct cfgdata *, const char *);
86 struct node *config_bycpuid_lookup(struct cfgdata *, uint32_t);
87 struct node *config_bydevid_lookup(struct cfgdata *, const char *);
88 struct node *config_bytp_lookup(struct cfgdata *, const char *);
90 #ifdef __cplusplus
92 #endif
94 #endif /* _EFT_CONFIG_H */