4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 1994 by Sun Microsystems, Inc.
27 %#pragma ident "%Z%%M% %I% %E% SMI"
29 %#include <sys/fs/ufs_fs.h>
30 %#include <sys/types.h>
31 %#include <sys/errno.h>
35 UFSDRC_NOENT = ENOENT, /* can't find fsck */
36 UFSDRC_PERM = EPERM, /* no permissions */
37 UFSDRC_INVAL = EINVAL, /* poorly formed args */
38 UFSDRC_NOEXEC = ENOEXEC, /* can't exec fsck */
39 UFSDRC_NODEV = ENODEV, /* invalid file system id */
40 UFSDRC_NXIO = ENXIO, /* bad special device */
41 UFSDRC_BUSY = EBUSY, /* another fsck in progress */
42 UFSDRC_OPNOTSUP = EOPNOTSUPP, /* daemons mode makes this unfeasible */
43 UFSDRC_EXECERR = 254, /* fsck/child ran but had an error */
44 UFSDRC_ERR = 255 /* generic error */
47 struct fs_identity_t {
49 string fs_name<MAXMNTLEN>;
52 struct ufsd_repairfs_args_t {
53 fs_identity_t ua_fsid;
54 unsigned int ua_attempts;
57 struct ufsd_repairfs_list_t {
59 ufsd_repairfs_args_t *ual_list;
69 enum ufsd_boot_type_t {
83 enum ufsd_fsck_state_t {
90 const UFSD_VARMSGMAX = 1024;
91 const UFSD_SPAREMSGBYTES = 4;
92 struct ufsd_log_data_t {
95 char umld_buf<UFSD_VARMSGMAX>;
99 union ufsd_log_msg_t switch (ufsd_log_op_t um_lop) {
105 ufsd_log_data_t um_logdata;
112 union ufsd_msg_vardata_t switch (ufsd_event_t umv_ev) {
116 ufsd_boot_type_t umv_b;
118 ufsd_fsck_state_t umv_fs;
120 ufsd_log_msg_t umv_lm;
127 unsigned int um_from;
128 char um_spare<UFSD_SPAREMSGBYTES>;
129 ufsd_msg_vardata_t um_var;
132 %#define UFSD_SERVNAME "ufsd"
133 %#define xdr_dev_t xdr_u_int
134 %#define xdr_time_t xdr_int
137 % * Set UFSD_THISVERS to the newest version of the protocol
138 % * This allows the preprocessor to force an error if the
139 % * protocol changes, since the kernel xdr routines may need to be
140 % * recoded. Note that we can't explicitly set the version to a
141 % * symbol as rpcgen will then create erroneous routine names.
144 %#define UFSD_ORIGVERS UFSD_V1
145 %#define UFSD_THISVERS 1
149 ufsdrc_t UFSD_NULL(void) = 0;
150 ufsdrc_t UFSD_REPAIRFS(ufsd_repairfs_args_t) = 1;
151 ufsdrc_t UFSD_REPAIRFSLIST(ufsd_repairfs_list_t) = 2;
152 ufsdrc_t UFSD_SEND(ufsd_msg_t) = 3;
153 ufsdrc_t UFSD_RECV(ufsd_msg_t) = 4;
154 ufsdrc_t UFSD_EXIT(void) = 5;