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 /*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _DISKMOND_CONF_H
28 #define _DISKMOND_CONF_H
29
30 #pragma ident "%Z%%M% %I% %E% SMI"
31
32 /*
33 * Configuration File data
34 */
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #include <sys/types.h>
41 #include <pthread.h>
42 #include <libnvpair.h>
43 #include <fm/fmd_api.h>
44 #include "dm_types.h"
45 #include "util.h"
46
47 #ifndef MIN
48 #define MIN(x, y) ((x) < (y) ? (x) : (y))
49 #endif
50
51 #ifndef MAX
52 #define MAX(x, y) ((x) > (y) ? (x) : (y))
53 #endif
54
55 #define DEVICES_PREFIX "/devices"
56
57 #define GLOBAL_PROP_LOG_LEVEL "log-level"
58
59 /* Property names (and values) for the disk configuration file entity */
60 #define DISK_PROP_DEVPATH "dev-path"
61 #define DISK_PROP_LOGNAME "logical-path"
62 #define DISK_PROP_FRUACTION "fru-update-action"
63 #define DISK_PROP_OTEMPACTION "overtemp-action"
64 #define DISK_PROP_STFAILACTION "selftest-fail-action"
65
66 /* Properties for the "ap" subentity */
67 #define DISK_AP_PROP_APID "path"
68
69 #define DEVPATH_MINOR_SEPARATOR ':'
70
71 #define DEFAULT_FAULT_POLLING_INTERVAL 3600 /* seconds */
72
73 #define INDICATOR_FAULT_IDENTIFIER "FAULT"
74
75 typedef enum conf_err_e {
76 E_NO_ERROR = 0,
77 E_MULTIPLE_IND_LISTS_DEFINED,
78 E_MULTIPLE_INDRULE_LISTS_DEFINED,
79 E_INVALID_STATE_CHANGE,
80 E_IND_MULTIPLY_DEFINED,
81 E_IND_ACTION_REDUNDANT,
82 E_IND_ACTION_CONFLICT,
83 E_IND_MISSING_FAULT_ON,
84 E_IND_MISSING_FAULT_OFF,
|
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 /*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
26 */
27
28 #ifndef _DISKMOND_CONF_H
29 #define _DISKMOND_CONF_H
30
31 /*
32 * Configuration File data
33 */
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 #include <sys/types.h>
40 #include <pthread.h>
41 #include <libnvpair.h>
42 #include <fm/fmd_api.h>
43 #include "dm_types.h"
44 #include "util.h"
45
46 #ifndef MIN
47 #define MIN(x, y) ((x) < (y) ? (x) : (y))
48 #endif
49
50 #ifndef MAX
51 #define MAX(x, y) ((x) > (y) ? (x) : (y))
52 #endif
53
54 #define DEVICES_PREFIX "/devices"
55
56 #define GLOBAL_PROP_LOG_LEVEL "log-level"
57
58 /* Property names (and values) for the disk configuration file entity */
59 #define DISK_PROP_DEVPATH "dev-path"
60 #define DISK_PROP_LOGNAME "logical-path"
61 #define DISK_PROP_FRUACTION "fru-update-action"
62 #define DISK_PROP_OTEMPACTION "overtemp-action"
63 #define DISK_PROP_STFAILACTION "selftest-fail-action"
64 #define DISK_PROP_SSMWEAROUTACTION "ssm-wearout-action"
65
66 /* Properties for the "ap" subentity */
67 #define DISK_AP_PROP_APID "path"
68
69 #define DEVPATH_MINOR_SEPARATOR ':'
70
71 #define DEFAULT_FAULT_POLLING_INTERVAL 3600 /* seconds */
72
73 #define INDICATOR_FAULT_IDENTIFIER "FAULT"
74
75 typedef enum conf_err_e {
76 E_NO_ERROR = 0,
77 E_MULTIPLE_IND_LISTS_DEFINED,
78 E_MULTIPLE_INDRULE_LISTS_DEFINED,
79 E_INVALID_STATE_CHANGE,
80 E_IND_MULTIPLY_DEFINED,
81 E_IND_ACTION_REDUNDANT,
82 E_IND_ACTION_CONFLICT,
83 E_IND_MISSING_FAULT_ON,
84 E_IND_MISSING_FAULT_OFF,
|