xref: /onnv-gate/usr/src/cmd/availdevs/availdevs.h (revision 5582:c4c30e76a747)
1789Sahrens /*
2789Sahrens  * CDDL HEADER START
3789Sahrens  *
4789Sahrens  * The contents of this file are subject to the terms of the
5*5582Scristian  * Common Development and Distribution License (the "License").
6*5582Scristian  * You may not use this file except in compliance with the License.
7789Sahrens  *
8789Sahrens  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9789Sahrens  * or http://www.opensolaris.org/os/licensing.
10789Sahrens  * See the License for the specific language governing permissions
11789Sahrens  * and limitations under the License.
12789Sahrens  *
13789Sahrens  * When distributing Covered Code, include this CDDL HEADER in each
14789Sahrens  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15789Sahrens  * If applicable, add the following below this CDDL HEADER, with the
16789Sahrens  * fields enclosed by brackets "[]" replaced with your own identifying
17789Sahrens  * information: Portions Copyright [yyyy] [name of copyright owner]
18789Sahrens  *
19789Sahrens  * CDDL HEADER END
20789Sahrens  */
21789Sahrens /*
22*5582Scristian  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23789Sahrens  * Use is subject to license terms.
24789Sahrens  */
25789Sahrens 
26789Sahrens #ifndef _AVAILDEVS_H
27789Sahrens #define	_AVAILDEVS_H
28789Sahrens 
29789Sahrens #pragma ident	"%Z%%M%	%I%	%E% SMI"
30789Sahrens 
31789Sahrens #ifdef __cplusplus
32789Sahrens extern "C" {
33789Sahrens #endif
34789Sahrens 
35789Sahrens /*
36789Sahrens  * Constants
37789Sahrens  */
38789Sahrens 
39894Stalley /* Command-line arguments */
40894Stalley #define	CLI_ARG_ALL			'a'
41894Stalley #define	CLI_ARG_DEVICES			'd'
42894Stalley #define	CLI_ARG_POOLS			'p'
43894Stalley #define	CLI_OPTSTRING			"apd"
44894Stalley 
45789Sahrens /* Must match the values in XMLDataModel.java */
46894Stalley #define	ELEMENT_ALIAS			"alias"
47789Sahrens #define	ELEMENT_AVAILABLE		"available"
48789Sahrens #define	ELEMENT_DISK			"disk"
49894Stalley #define	ELEMENT_IMPORTABLE		"importable"
50894Stalley #define	ELEMENT_POOL			"pool"
51894Stalley #define	ELEMENT_ROOT			"zfsconfig"
52789Sahrens #define	ELEMENT_SLICE			"slice"
531206Stalley 
54894Stalley #define	ATTR_ALIAS_NAME			"name"
551206Stalley #define	ATTR_DEVICE_STATE		"devicestate"
561206Stalley #define	ATTR_DEVICE_STATUS		"devicestatus"
57894Stalley #define	ATTR_DISK_INUSE			"inuse"
58789Sahrens #define	ATTR_DISK_NAME			"name"
59789Sahrens #define	ATTR_DISK_SIZE			"size"
601206Stalley #define	ATTR_POOL_CHECKSUM_ERRORS	"checksumerrors"
61894Stalley #define	ATTR_POOL_ID			"id"
62894Stalley #define	ATTR_POOL_NAME			"name"
631206Stalley #define	ATTR_POOL_READ_BYTES		"readbytes"
641206Stalley #define	ATTR_POOL_READ_ERRORS		"readerrors"
651206Stalley #define	ATTR_POOL_READ_OPERATIONS	"readoperations"
661378Stalley #define	ATTR_POOL_REPLACEMENT_SIZE	"replacementsize"
671206Stalley #define	ATTR_POOL_SIZE			"size"
681206Stalley #define	ATTR_POOL_STATE			"poolstate"
691206Stalley #define	ATTR_POOL_STATUS		"poolstatus"
70*5582Scristian #define	ATTR_POOL_VERSION		"poolversion"
711206Stalley #define	ATTR_POOL_USED			"used"
721206Stalley #define	ATTR_POOL_WRITE_BYTES		"writebytes"
731206Stalley #define	ATTR_POOL_WRITE_ERRORS		"writeerrors"
741206Stalley #define	ATTR_POOL_WRITE_OPERATIONS	"writeoperations"
75789Sahrens #define	ATTR_SLICE_NAME			"name"
76789Sahrens #define	ATTR_SLICE_SIZE			"size"
77789Sahrens #define	ATTR_SLICE_START		"start"
78894Stalley #define	ATTR_SLICE_USED_BY		"used-by"
79789Sahrens #define	ATTR_SLICE_USED_NAME		"used-name"
801206Stalley 
81894Stalley #define	VAL_ATTR_FALSE			"false"
82789Sahrens #define	VAL_ATTR_TRUE			"true"
83789Sahrens 
84789Sahrens #ifdef __cplusplus
85789Sahrens }
86789Sahrens #endif
87789Sahrens 
88789Sahrens #endif /* _AVAILDEVS_H */
89