2 % * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 % * Use is subject to license terms.
7 % * The contents of this file are subject to the terms of the
8 % * Common Development and Distribution License, Version 1.0 only
9 % * (the "License"). You may not use this file except in compliance
12 % * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 % * or http://www.opensolaris.org/os/licensing.
14 % * See the License for the specific language governing permissions
15 % * and limitations under the License.
17 % * When distributing Covered Code, include this CDDL HEADER in each
18 % * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 % * If applicable, add the following below this CDDL HEADER, with the
20 % * fields enclosed by brackets "[]" replaced with your own identifying
21 % * information: Portions Copyright [yyyy] [name of copyright owner]
26 %#pragma ident "%Z%%M% %I% %E% SMI"
29 /* pick up multihost ioctl definitions */
42 %#define MHD_E_MAJORITY -1 /* couldn't get majority reservation */
43 %#define MHD_E_RESERVED -2 /* drive is reserved */
46 int errnum; /* errno or negative error code */
47 string name<>; /* associated name */
53 % * null error constant
55 %#define MHD_NULL_ERROR { 0, NULL }
61 % * Constant null error struct.
63 %const mhd_error_t mhd_null_error = MHD_NULL_ERROR;
69 % * External reference to constant null error struct. (decl. in metamhd_xdr.c)
71 %extern const mhd_error_t mhd_null_error;
79 typedef string mhd_drivename_t<>;
86 string setname<>; /* set name */
87 mhd_drivename_t drives<>; /* drive names */
94 typedef u_int mhd_opts_t;
97 %#define MHD_PARTIAL_SET 0x01 /* partial set definition */
98 %#define MHD_SERIAL 0x02 /* process disks serially */
106 MHD_FF_NONE, /* no failfast */
107 MHD_FF_DRIVER, /* set failfast on each drive */
108 MHD_FF_DEBUG, /* use /dev/ff debug mode */
109 MHD_FF_HALT, /* use /dev/ff halt mode */
110 MHD_FF_PANIC /* use /dev/ff panic mode */
112 struct mhd_tkown_args_t {
113 mhd_set_t set; /* set definition */
114 mhd_mhiargs_t timeouts; /* timeout values */
115 mhd_ff_mode_t ff_mode; /* failfast mode */
116 mhd_opts_t options; /* options */
121 % * release ownership
123 struct mhd_relown_args_t {
124 mhd_set_t set; /* set definition */
125 mhd_opts_t options; /* options */
132 struct mhd_status_args_t {
133 mhd_set_t set; /* set definition */
134 mhd_opts_t options; /* options */
136 struct mhd_drive_status_t {
137 mhd_drivename_t drive; /* drive name */
138 int errnum; /* drive status */
140 struct mhd_status_res_t {
141 mhd_error_t status; /* status of command */
142 mhd_drive_status_t results<>; /* drive status */
148 struct mhd_list_args_t {
149 string path<>; /* where to look (or NULL) */
150 mhd_did_flags_t flags; /* what to get */
152 struct mhd_list_res_t {
153 mhd_error_t status; /* status of command */
154 mhd_drive_info_list_t results; /* drive info list */
159 % * authorization info
161 const METAMHD_GID = 14; /* magic sysadmin group */
165 % * services available
168 version METAMHD_VERSION {
171 mhd_tkown(mhd_tkown_args_t) = 1;
174 mhd_relown(mhd_relown_args_t) = 2;
177 mhd_status(mhd_status_args_t) = 3;
180 mhd_list(mhd_list_args_t) = 4;