1 /* 2 * CDDL HEADER START 3 * 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. 7 * 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. 12 * 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] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 * 25 * platform -- platform-specific access to configuration database 26 */ 27 28 #ifndef _EFT_PLATFORM_H 29 #define _EFT_PLATFORM_H 30 31 #include <libnvpair.h> 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 #include <config.h> 38 #include <fm/fmd_api.h> 39 #include <fm/libtopo.h> 40 41 nvlist_t *Action_nvl; /* nvl for problem with action=... prop on it */ 42 43 void platform_init(void); 44 void platform_fini(void); 45 void platform_run_poller(const char *poller); 46 void platform_set_payloadnvp(nvlist_t *nvlp); 47 void platform_unit_translate(int, struct config *, const char *, nvlist_t **, 48 char *); 49 50 struct cfgdata *platform_config_snapshot(void); 51 void platform_restore_config(fmd_hdl_t *hdl, fmd_case_t *fmcase); 52 void platform_save_config(fmd_hdl_t *hdl, fmd_case_t *fmcase); 53 struct node *platform_getpath(nvlist_t *nvl); 54 55 char **platform_get_eft_files(void); 56 void platform_free_eft_files(char **); 57 58 int platform_call(struct node *np, struct lut **globals, struct config *croot, 59 struct arrow *arrowp, struct evalue *valuep); 60 int platform_confcall(struct node *np, struct lut **globals, 61 struct config *croot, struct arrow *arrowp, struct evalue *valuep); 62 int platform_payloadprop(struct node *np, struct evalue *valuep); 63 struct evalue *platform_payloadprop_values(const char *s, int *nvals); 64 int platform_path_exists(nvlist_t *fmri); 65 const struct ipath *platform_fault2ipath(nvlist_t *flt); 66 67 #ifdef __cplusplus 68 } 69 #endif 70 71 #endif /* _EFT_PLATFORM_H */ 72