1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
* or http://www.opensolaris.org/os/licensing.
* 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 1994 by Sun Microsystems, Inc.
* All Rights Reserved
*/
%#pragma ident "%Z%%M% %I% %E% SMI"
%#include <sys/fs/ufs_fs.h>
%#include <sys/types.h>
%#include <sys/errno.h>
enum ufsdrc_t {
UFSDRC_OK = 0,
UFSDRC_NOENT = ENOENT, /* can't find fsck */
UFSDRC_PERM = EPERM, /* no permissions */
UFSDRC_INVAL = EINVAL, /* poorly formed args */
UFSDRC_NOEXEC = ENOEXEC, /* can't exec fsck */
UFSDRC_NODEV = ENODEV, /* invalid file system id */
UFSDRC_NXIO = ENXIO, /* bad special device */
UFSDRC_BUSY = EBUSY, /* another fsck in progress */
UFSDRC_OPNOTSUP = EOPNOTSUPP, /* daemons mode makes this unfeasible */
UFSDRC_EXECERR = 254, /* fsck/child ran but had an error */
UFSDRC_ERR = 255 /* generic error */
};
struct fs_identity_t {
dev_t fs_dev;
string fs_name<MAXMNTLEN>;
};
struct ufsd_repairfs_args_t {
fs_identity_t ua_fsid;
unsigned int ua_attempts;
};
struct ufsd_repairfs_list_t {
int ual_listlen;
ufsd_repairfs_args_t *ual_list;
};
enum ufsd_event_t {
UFSDEV_NONE = 0,
UFSDEV_REBOOT,
UFSDEV_FSCK,
UFSDEV_LOG_OP
};
enum ufsd_boot_type_t {
UFSDB_NONE = 0,
UFSDB_CLEAN,
UFSDB_POSTPANIC
};
enum ufsd_log_op_t {
UFSDLO_NONE = 0,
UFSDLO_COMMIT,
UFSDLO_GET,
UFSDLO_PUT,
UFSDLO_RESET
};
enum ufsd_fsck_state_t {
UFSDFS_NONE = 0,
UFSDFS_DISPATCH,
UFSDFS_ERREXIT,
UFSDFS_SUCCESS
};
const UFSD_VARMSGMAX = 1024;
const UFSD_SPAREMSGBYTES = 4;
struct ufsd_log_data_t {
int umld_eob;
int umld_seq;
char umld_buf<UFSD_VARMSGMAX>;
};
union ufsd_log_msg_t switch (ufsd_log_op_t um_lop) {
case UFSDLO_COMMIT:
void;
case UFSDLO_GET:
void;
case UFSDLO_PUT:
ufsd_log_data_t um_logdata;
case UFSDLO_RESET:
void;
default:
void;
};
union ufsd_msg_vardata_t switch (ufsd_event_t umv_ev) {
case UFSDEV_NONE:
void;
case UFSDEV_REBOOT:
ufsd_boot_type_t umv_b;
case UFSDEV_FSCK:
ufsd_fsck_state_t umv_fs;
case UFSDEV_LOG_OP:
ufsd_log_msg_t umv_lm;
default:
void;
};
struct ufsd_msg_t {
time_t um_time;
unsigned int um_from;
char um_spare<UFSD_SPAREMSGBYTES>;
ufsd_msg_vardata_t um_var;
};
%#define UFSD_SERVNAME "ufsd"
%#define xdr_dev_t xdr_u_int
%#define xdr_time_t xdr_int
%/*
% * Set UFSD_THISVERS to the newest version of the protocol
% * This allows the preprocessor to force an error if the
% * protocol changes, since the kernel xdr routines may need to be
% * recoded. Note that we can't explicitly set the version to a
% * symbol as rpcgen will then create erroneous routine names.
% */
%#define UFSD_V1 1
%#define UFSD_ORIGVERS UFSD_V1
%#define UFSD_THISVERS 1
program UFSD_PROG {
version UFSD_VERS {
ufsdrc_t UFSD_NULL(void) = 0;
ufsdrc_t UFSD_REPAIRFS(ufsd_repairfs_args_t) = 1;
ufsdrc_t UFSD_REPAIRFSLIST(ufsd_repairfs_list_t) = 2;
ufsdrc_t UFSD_SEND(ufsd_msg_t) = 3;
ufsdrc_t UFSD_RECV(ufsd_msg_t) = 4;
ufsdrc_t UFSD_EXIT(void) = 5;
} = 1;
} = 100233;
|