summaryrefslogtreecommitdiff
path: root/libtreefs/s-io.c
blob: 6fdc504a4cce27d6e1e7281a41dcf78b0c57478e (plain)
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
/* io_t rpc stubs; see <hurd/io.defs> for more info

   Copyright (C) 1995 Free Software Foundation, Inc.

   Written by Miles Bader <miles@gnu.ai.mit.edu>

   Note that since the user overrides the builtin routines via hook vectors
   instead of declaring his own stubs, it doesn't make a lot of sense to put
   these routines in separate files (like diskfs).  This way should compile
   faster, with dynamic libraries it  won't matter in any case.

   This file is part of the GNU Hurd.

   The GNU Hurd is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2, or (at
   your option) any later version.

   The GNU Hurd is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */

error_t
treefs_S_io_get_icky_async_id (struct treefs_protid *cred,
			       mach_port_t *id, mach_msg_type_name_t *id_type)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_get_icky_async_id (cred, id, id_type);
}

error_t
treefs_S_io_async (struct treefs_protid *cred,
		   mach_port_t notify,
		   mach_port_t *id, mach_msg_type_name_t *id_type)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_async (cred, notify, id, id_type);
}

error_t
treefs_S_io_duplicate (struct treefs_protid *cred,
		       mach_port_t *port,
		       mach_msg_type_name_t *port_type)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_duplicate (cred, port, port_type);
}

error_t
treefs_S_io_get_conch (struct treefs_protid *cred)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_get_conch (cred);
}

error_t
treefs_S_io_interrupt (struct treefs_protid *cred)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_interrupt (cred);
}

error_t
treefs_S_io_map_cntl (struct treefs_protid *cred,
		      memory_object_t *ctlobj,
		      mach_msg_type_name_t *ctlobj_type)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_map_cntl (cred, ctlobj, ctlobj_type);
}

error_t
treefs_S_io_map (struct treefs_protid *cred,
		 memory_object_t *rdobj, mach_msg_type_name_t *rd_type,
		 memory_object_t *wrobj, mach_msg_type_name_t *wr_type)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_map (cred, rdobj, rd_type, wrobj, wr_type);
}

error_t
treefs_S_io_get_openmodes (struct treefs_protid *cred, int *bits)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_get_openmodes (cred, bits);
}

error_t
treefs_S_io_clear_some_openmodes (struct treefs_protid *cred, int bits)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_clear_some_openmodes (cred, bits);
}

error_t
treefs_S_io_set_some_openmodes (struct treefs_protid *cred, int bits)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_set_some_openmodes (cred, bits);
}

error_t
treefs_S_io_set_all_openmodes (struct treefs_protid *cred, int bits)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_set_all_openmodes (cred, bits);
}

error_t
treefs_S_io_get_owner (struct treefs_protid *cred, pid_t *owner)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_get_owner (cred, owner);
}

error_t
treefs_S_io_mod_owner (struct treefs_protid *cred, pid_t owner)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_mod_owner (cred, owner);
}

error_t
treefs_S_io_prenotify (struct treefs_protid *cred,
		       vm_offset_t start, vm_offset_t end)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_prenotify (cred, start, end);
}

error_t
treefs_S_io_read (struct treefs_protid *cred,
		  char **data,
		  mach_msg_type_number_t *data_len,
		  off_t offset,
		  mach_msg_type_number_t max)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_read (cred, data, data_len, offset, max);
}

error_t
treefs_S_io_readable (struct treefs_protid *cred,
		      mach_msg_type_number_t *amount)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_readable (cred, amount);
}

error_t
treefs_S_io_reauthenticate (struct treefs_protid *cred, mach_port_t rend_port)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_reauthenticate (cred, rend_port);
}

error_t
treefs_S_io_release_conch (struct treefs_protid *cred)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_release_conch (cred);
}

error_t
treefs_S_io_restrict_auth (struct treefs_protid *cred,
			   mach_port_t *newport,
			   mach_msg_type_name_t *newport_type,
			   uid_t *uids, unsigned nuids,
			   gid_t *gids, unsigned ngids)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_restrict_auth (cred, newport, newport_type,
				    uids, nuids, gids, ngids);
}

error_t
treefs_S_io_seek (struct treefs_protid *cred,
		  off_t offset, int whence, off_t *new_offset)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_seek (cred, offset, whence, new_offset);
}

error_t
treefs_S_io_select (struct treefs_protid *cred, int *type, int *tag)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_select (cred, type, tag);
}

error_t
treefs_S_io_sigio (struct treefs_protid *cred)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_sigio (cred);
}

error_t
treefs_S_io_stat (struct treefs_protid *cred, io_statbuf_t *statbuf)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_statbuf_t (cred, statbuf);
}

error_t
treefs_S_io_readsleep (struct treefs_protid *cred)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_readsleep (cred);
}

error_t
treefs_S_io_eofnotify (struct treefs_protid *cred)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_eofnotify (cred);
}

error_t
treefs_S_io_postnotify (struct treefs_protid *cred,
			vm_offset_t start, vm_offset_t end)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_postnotify (cred, start, end);
}

error_t
treefs_S_io_readnotify (struct treefs_protid *cred)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_readnotify (cred);
}     

error_t
treefs_S_io_server_version (struct treefs_protid *cred,
			    char *server_name,
			    int *major, int *minor, int *edit)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_server_version (cred, server_version, major, minor, edit);
}

error_t
treefs_S_io_write (struct treefs_protid *cred,
		   char *data, mach_msg_type_number_t data_len,
		   off_t offset, mach_msg_type_number_t *amount)
{
  if (!cred)
    return EOPNOTSUPP;
  return treefs_s_io_write (cred, data, data_len, offset, amount);
}