/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _DISKMOND_CONF_H
#define _DISKMOND_CONF_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Configuration File data
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <pthread.h>
#include <libnvpair.h>
#include "dm_types.h"
#include "util.h"
#ifndef MIN
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#endif
#ifndef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#endif
/* Property names (and values) for the disk configuration file entity */
/* Properties for the "ap" subentity */
typedef enum conf_err_e {
E_NO_ERROR = 0,
} conf_err_t;
typedef enum {
} ind_state_t;
typedef enum {
typedef struct ind_action {
char *ind_name;
} ind_action_t;
typedef struct state_transition {
typedef struct indrule {
} indrule_t;
typedef struct indicator {
char *ind_name;
char *ind_instr_spec;
} indicator_t;
typedef struct diskmon {
/*
* Static configuration data
*/
/*
* Dynamic data
*/
/*
* Only one manager can be manipulating the
* state in the diskmon at one time (either the
* state-change manager or the fault-polling manager)
*/
/*
* Set to true only during initialization, and
* cleared the next time a fru update needs to
* occur, this flag enabled an optimization of
* NOT calling libtopo for a configuration update
* when the DE starts up. This allows a HUGE
* savings (since only a single snapshot-- the
* initial snapshot) is used as the source of
* the FRU information.
*/
/* For the state-change manager: */
/*
* Current state of the fault indicator.
*/
/*
* Set to TRUE when a disk transitions to the CONFIGURED state
* and remains TRUE until the disk is physically removed.
*/
/*
* The number of disk hotplug state transitions since the disk
* was inserted.
*/
/* Disk FRU (model, manufacturer, etc) information */
} diskmon_t;
typedef struct cfgdata {
} cfgdata_t;
typedef struct namevalpr {
char *name;
char *value;
} namevalpr_t;
char *actionp);
void *arg);
extern int config_init(void);
extern void config_fini(void);
extern nvlist_t *dm_global_proplist(void);
#ifdef __cplusplus
}
#endif
#endif /* _DISKMOND_CONF_H */