blob: 93d6f7c1af461fc742ff88a5216f36bccb86ec08 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_CODA_HEADER_
20#define _UAPI_CODA_HEADER_
21#if defined(__NetBSD__) || (defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL)
22#include <sys/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#endif
24#ifndef CODA_MAXSYMLINKS
25#define CODA_MAXSYMLINKS 10
26#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070027#if defined(DJGPP) || defined(__CYGWIN32__)
28#ifdef KERNEL
29typedef unsigned long u_long;
30typedef unsigned int u_int;
Ben Cheng655a7c02013-10-16 16:09:24 -070031typedef unsigned short u_short;
32typedef u_long ino_t;
33typedef u_long dev_t;
34typedef void * caddr_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070035#ifdef DOS
36typedef unsigned __int64 u_quad_t;
37#else
38typedef unsigned long long u_quad_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070039#endif
40#define inline
41struct timespec {
Tao Baod7db5942015-01-28 10:07:51 -080042 long ts_sec;
Tao Baod7db5942015-01-28 10:07:51 -080043 long ts_nsec;
Ben Cheng655a7c02013-10-16 16:09:24 -070044};
45#else
46#include <sys/time.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070047typedef unsigned long long u_quad_t;
48#endif
49#endif
50#ifdef __linux__
Ben Cheng655a7c02013-10-16 16:09:24 -070051#include <linux/time.h>
52#define cdev_t u_quad_t
53#if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
54#define _UQUAD_T_ 1
Ben Cheng655a7c02013-10-16 16:09:24 -070055typedef unsigned long long u_quad_t;
56#endif
57#else
58#define cdev_t dev_t
Ben Cheng655a7c02013-10-16 16:09:24 -070059#endif
60#ifdef __CYGWIN32__
61struct timespec {
Tao Baod7db5942015-01-28 10:07:51 -080062 time_t tv_sec;
Tao Baod7db5942015-01-28 10:07:51 -080063 long tv_nsec;
Ben Cheng655a7c02013-10-16 16:09:24 -070064};
65#endif
66#ifndef __BIT_TYPES_DEFINED__
Ben Cheng655a7c02013-10-16 16:09:24 -070067#define __BIT_TYPES_DEFINED__
68typedef signed char int8_t;
69typedef unsigned char u_int8_t;
70typedef short int16_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070071typedef unsigned short u_int16_t;
72typedef int int32_t;
73typedef unsigned int u_int32_t;
74#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070075#define CODA_MAXNAMLEN 255
76#define CODA_MAXPATHLEN 1024
77#define CODA_MAXSYMLINK 10
78#define C_O_READ 0x001
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define C_O_WRITE 0x002
80#define C_O_TRUNC 0x010
81#define C_O_EXCL 0x100
82#define C_O_CREAT 0x200
Ben Cheng655a7c02013-10-16 16:09:24 -070083#define C_M_READ 00400
84#define C_M_WRITE 00200
85#define C_A_C_OK 8
86#define C_A_R_OK 4
Ben Cheng655a7c02013-10-16 16:09:24 -070087#define C_A_W_OK 2
88#define C_A_X_OK 1
89#define C_A_F_OK 0
90#ifndef _VENUS_DIRENT_T_
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define _VENUS_DIRENT_T_ 1
92struct venus_dirent {
Tao Baod7db5942015-01-28 10:07:51 -080093 u_int32_t d_fileno;
94 u_int16_t d_reclen;
Tao Baod7db5942015-01-28 10:07:51 -080095 u_int8_t d_type;
96 u_int8_t d_namlen;
97 char d_name[CODA_MAXNAMLEN + 1];
Ben Cheng655a7c02013-10-16 16:09:24 -070098};
Ben Cheng655a7c02013-10-16 16:09:24 -070099#undef DIRSIZ
Tao Baod7db5942015-01-28 10:07:51 -0800100#define DIRSIZ(dp) ((sizeof(struct venus_dirent) - (CODA_MAXNAMLEN + 1)) + (((dp)->d_namlen + 1 + 3) & ~3))
Ben Cheng655a7c02013-10-16 16:09:24 -0700101#define CDT_UNKNOWN 0
102#define CDT_FIFO 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700103#define CDT_CHR 2
104#define CDT_DIR 4
105#define CDT_BLK 6
106#define CDT_REG 8
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define CDT_LNK 10
108#define CDT_SOCK 12
109#define CDT_WHT 14
110#define IFTOCDT(mode) (((mode) & 0170000) >> 12)
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define CDTTOIF(dirtype) ((dirtype) << 12)
112#endif
113#ifndef _VUID_T_
114#define _VUID_T_
Ben Cheng655a7c02013-10-16 16:09:24 -0700115typedef u_int32_t vuid_t;
116typedef u_int32_t vgid_t;
117#endif
118struct CodaFid {
Tao Baod7db5942015-01-28 10:07:51 -0800119 u_int32_t opaque[4];
Ben Cheng655a7c02013-10-16 16:09:24 -0700120};
Tao Baod7db5942015-01-28 10:07:51 -0800121#define coda_f2i(fid) (fid ? (fid->opaque[3] ^ (fid->opaque[2] << 10) ^ (fid->opaque[1] << 20) ^ fid->opaque[0]) : 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#ifndef _VENUS_VATTR_T_
Ben Cheng655a7c02013-10-16 16:09:24 -0700123#define _VENUS_VATTR_T_
Tao Baod7db5942015-01-28 10:07:51 -0800124enum coda_vtype {
125 C_VNON,
126 C_VREG,
Tao Baod7db5942015-01-28 10:07:51 -0800127 C_VDIR,
128 C_VBLK,
129 C_VCHR,
130 C_VLNK,
Tao Baod7db5942015-01-28 10:07:51 -0800131 C_VSOCK,
132 C_VFIFO,
133 C_VBAD
Ben Cheng655a7c02013-10-16 16:09:24 -0700134};
Tao Baod7db5942015-01-28 10:07:51 -0800135struct coda_vattr {
136 long va_type;
137 u_short va_mode;
138 short va_nlink;
Tao Baod7db5942015-01-28 10:07:51 -0800139 vuid_t va_uid;
140 vgid_t va_gid;
141 long va_fileid;
142 u_quad_t va_size;
Tao Baod7db5942015-01-28 10:07:51 -0800143 long va_blocksize;
144 struct timespec va_atime;
145 struct timespec va_mtime;
146 struct timespec va_ctime;
Tao Baod7db5942015-01-28 10:07:51 -0800147 u_long va_gen;
148 u_long va_flags;
149 cdev_t va_rdev;
150 u_quad_t va_bytes;
Tao Baod7db5942015-01-28 10:07:51 -0800151 u_quad_t va_filerev;
152};
Ben Cheng655a7c02013-10-16 16:09:24 -0700153#endif
154struct coda_statfs {
Tao Baod7db5942015-01-28 10:07:51 -0800155 int32_t f_blocks;
156 int32_t f_bfree;
157 int32_t f_bavail;
158 int32_t f_files;
Tao Baod7db5942015-01-28 10:07:51 -0800159 int32_t f_ffree;
Ben Cheng655a7c02013-10-16 16:09:24 -0700160};
Ben Cheng655a7c02013-10-16 16:09:24 -0700161#define CODA_ROOT 2
162#define CODA_OPEN_BY_FD 3
163#define CODA_OPEN 4
164#define CODA_CLOSE 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700165#define CODA_IOCTL 6
166#define CODA_GETATTR 7
167#define CODA_SETATTR 8
168#define CODA_ACCESS 9
Ben Cheng655a7c02013-10-16 16:09:24 -0700169#define CODA_LOOKUP 10
170#define CODA_CREATE 11
171#define CODA_REMOVE 12
172#define CODA_LINK 13
Ben Cheng655a7c02013-10-16 16:09:24 -0700173#define CODA_RENAME 14
174#define CODA_MKDIR 15
175#define CODA_RMDIR 16
176#define CODA_SYMLINK 18
Ben Cheng655a7c02013-10-16 16:09:24 -0700177#define CODA_READLINK 19
178#define CODA_FSYNC 20
179#define CODA_VGET 22
180#define CODA_SIGNAL 23
Ben Cheng655a7c02013-10-16 16:09:24 -0700181#define CODA_REPLACE 24
182#define CODA_FLUSH 25
183#define CODA_PURGEUSER 26
184#define CODA_ZAPFILE 27
Ben Cheng655a7c02013-10-16 16:09:24 -0700185#define CODA_ZAPDIR 28
186#define CODA_PURGEFID 30
187#define CODA_OPEN_BY_PATH 31
188#define CODA_RESOLVE 32
Ben Cheng655a7c02013-10-16 16:09:24 -0700189#define CODA_REINTEGRATE 33
190#define CODA_STATFS 34
191#define CODA_STORE 35
192#define CODA_RELEASE 36
Ben Cheng655a7c02013-10-16 16:09:24 -0700193#define CODA_NCALLS 37
194#define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
Tao Baod7db5942015-01-28 10:07:51 -0800195#define VC_MAXDATASIZE 8192
196#define VC_MAXMSGSIZE sizeof(union inputArgs) + sizeof(union outputArgs) + VC_MAXDATASIZE
Ben Cheng655a7c02013-10-16 16:09:24 -0700197#define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
198#define CODA_KERNEL_VERSION 3
199struct coda_in_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800200 u_int32_t opcode;
201 u_int32_t unique;
202 pid_t pid;
Tao Baod7db5942015-01-28 10:07:51 -0800203 pid_t pgid;
204 vuid_t uid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700205};
206struct coda_out_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800207 u_int32_t opcode;
208 u_int32_t unique;
209 u_int32_t result;
Ben Cheng655a7c02013-10-16 16:09:24 -0700210};
211struct coda_root_out {
Tao Baod7db5942015-01-28 10:07:51 -0800212 struct coda_out_hdr oh;
213 struct CodaFid VFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700214};
Tao Baod7db5942015-01-28 10:07:51 -0800215struct coda_root_in {
216 struct coda_in_hdr in;
Ben Cheng655a7c02013-10-16 16:09:24 -0700217};
218struct coda_open_in {
Tao Baod7db5942015-01-28 10:07:51 -0800219 struct coda_in_hdr ih;
220 struct CodaFid VFid;
221 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700222};
Tao Baod7db5942015-01-28 10:07:51 -0800223struct coda_open_out {
224 struct coda_out_hdr oh;
225 cdev_t dev;
226 ino_t inode;
Ben Cheng655a7c02013-10-16 16:09:24 -0700227};
228struct coda_store_in {
Tao Baod7db5942015-01-28 10:07:51 -0800229 struct coda_in_hdr ih;
230 struct CodaFid VFid;
Tao Baod7db5942015-01-28 10:07:51 -0800231 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700232};
Ben Cheng655a7c02013-10-16 16:09:24 -0700233struct coda_store_out {
Tao Baod7db5942015-01-28 10:07:51 -0800234 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700235};
236struct coda_release_in {
Tao Baod7db5942015-01-28 10:07:51 -0800237 struct coda_in_hdr ih;
238 struct CodaFid VFid;
Tao Baod7db5942015-01-28 10:07:51 -0800239 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700240};
Ben Cheng655a7c02013-10-16 16:09:24 -0700241struct coda_release_out {
Tao Baod7db5942015-01-28 10:07:51 -0800242 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700243};
244struct coda_close_in {
Tao Baod7db5942015-01-28 10:07:51 -0800245 struct coda_in_hdr ih;
246 struct CodaFid VFid;
Tao Baod7db5942015-01-28 10:07:51 -0800247 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700248};
Ben Cheng655a7c02013-10-16 16:09:24 -0700249struct coda_close_out {
Tao Baod7db5942015-01-28 10:07:51 -0800250 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700251};
252struct coda_ioctl_in {
Tao Baod7db5942015-01-28 10:07:51 -0800253 struct coda_in_hdr ih;
254 struct CodaFid VFid;
Tao Baod7db5942015-01-28 10:07:51 -0800255 int cmd;
256 int len;
257 int rwflag;
258 char * data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700259};
260struct coda_ioctl_out {
Tao Baod7db5942015-01-28 10:07:51 -0800261 struct coda_out_hdr oh;
262 int len;
Tao Baod7db5942015-01-28 10:07:51 -0800263 caddr_t data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700264};
Ben Cheng655a7c02013-10-16 16:09:24 -0700265struct coda_getattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800266 struct coda_in_hdr ih;
Tao Baod7db5942015-01-28 10:07:51 -0800267 struct CodaFid VFid;
268};
Ben Cheng655a7c02013-10-16 16:09:24 -0700269struct coda_getattr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800270 struct coda_out_hdr oh;
Tao Baod7db5942015-01-28 10:07:51 -0800271 struct coda_vattr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700272};
Ben Cheng655a7c02013-10-16 16:09:24 -0700273struct coda_setattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800274 struct coda_in_hdr ih;
Tao Baod7db5942015-01-28 10:07:51 -0800275 struct CodaFid VFid;
276 struct coda_vattr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700277};
278struct coda_setattr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800279 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700280};
Ben Cheng655a7c02013-10-16 16:09:24 -0700281struct coda_access_in {
Tao Baod7db5942015-01-28 10:07:51 -0800282 struct coda_in_hdr ih;
Tao Baod7db5942015-01-28 10:07:51 -0800283 struct CodaFid VFid;
284 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700285};
286struct coda_access_out {
Tao Baod7db5942015-01-28 10:07:51 -0800287 struct coda_out_hdr out;
288};
Ben Cheng655a7c02013-10-16 16:09:24 -0700289#define CLU_CASE_SENSITIVE 0x01
290#define CLU_CASE_INSENSITIVE 0x02
291struct coda_lookup_in {
Tao Baod7db5942015-01-28 10:07:51 -0800292 struct coda_in_hdr ih;
293 struct CodaFid VFid;
294 int name;
Tao Baod7db5942015-01-28 10:07:51 -0800295 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700296};
Ben Cheng655a7c02013-10-16 16:09:24 -0700297struct coda_lookup_out {
Tao Baod7db5942015-01-28 10:07:51 -0800298 struct coda_out_hdr oh;
Tao Baod7db5942015-01-28 10:07:51 -0800299 struct CodaFid VFid;
300 int vtype;
Ben Cheng655a7c02013-10-16 16:09:24 -0700301};
302struct coda_create_in {
Tao Baod7db5942015-01-28 10:07:51 -0800303 struct coda_in_hdr ih;
304 struct CodaFid VFid;
305 struct coda_vattr attr;
306 int excl;
Tao Baod7db5942015-01-28 10:07:51 -0800307 int mode;
308 int name;
Ben Cheng655a7c02013-10-16 16:09:24 -0700309};
310struct coda_create_out {
Tao Baod7db5942015-01-28 10:07:51 -0800311 struct coda_out_hdr oh;
312 struct CodaFid VFid;
313 struct coda_vattr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700314};
Tao Baod7db5942015-01-28 10:07:51 -0800315struct coda_remove_in {
316 struct coda_in_hdr ih;
317 struct CodaFid VFid;
318 int name;
Ben Cheng655a7c02013-10-16 16:09:24 -0700319};
320struct coda_remove_out {
Tao Baod7db5942015-01-28 10:07:51 -0800321 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700322};
323struct coda_link_in {
Tao Baod7db5942015-01-28 10:07:51 -0800324 struct coda_in_hdr ih;
325 struct CodaFid sourceFid;
326 struct CodaFid destFid;
Tao Baod7db5942015-01-28 10:07:51 -0800327 int tname;
Ben Cheng655a7c02013-10-16 16:09:24 -0700328};
Ben Cheng655a7c02013-10-16 16:09:24 -0700329struct coda_link_out {
Tao Baod7db5942015-01-28 10:07:51 -0800330 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700331};
332struct coda_rename_in {
Tao Baod7db5942015-01-28 10:07:51 -0800333 struct coda_in_hdr ih;
334 struct CodaFid sourceFid;
Tao Baod7db5942015-01-28 10:07:51 -0800335 int srcname;
336 struct CodaFid destFid;
337 int destname;
Ben Cheng655a7c02013-10-16 16:09:24 -0700338};
Tao Baod7db5942015-01-28 10:07:51 -0800339struct coda_rename_out {
340 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700341};
342struct coda_mkdir_in {
Tao Baod7db5942015-01-28 10:07:51 -0800343 struct coda_in_hdr ih;
344 struct CodaFid VFid;
345 struct coda_vattr attr;
346 int name;
Ben Cheng655a7c02013-10-16 16:09:24 -0700347};
348struct coda_mkdir_out {
Tao Baod7db5942015-01-28 10:07:51 -0800349 struct coda_out_hdr oh;
350 struct CodaFid VFid;
Tao Baod7db5942015-01-28 10:07:51 -0800351 struct coda_vattr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700352};
Ben Cheng655a7c02013-10-16 16:09:24 -0700353struct coda_rmdir_in {
Tao Baod7db5942015-01-28 10:07:51 -0800354 struct coda_in_hdr ih;
Tao Baod7db5942015-01-28 10:07:51 -0800355 struct CodaFid VFid;
356 int name;
Ben Cheng655a7c02013-10-16 16:09:24 -0700357};
358struct coda_rmdir_out {
Tao Baod7db5942015-01-28 10:07:51 -0800359 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700360};
Ben Cheng655a7c02013-10-16 16:09:24 -0700361struct coda_symlink_in {
Tao Baod7db5942015-01-28 10:07:51 -0800362 struct coda_in_hdr ih;
Tao Baod7db5942015-01-28 10:07:51 -0800363 struct CodaFid VFid;
364 int srcname;
365 struct coda_vattr attr;
366 int tname;
Ben Cheng655a7c02013-10-16 16:09:24 -0700367};
368struct coda_symlink_out {
Tao Baod7db5942015-01-28 10:07:51 -0800369 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700370};
371struct coda_readlink_in {
Tao Baod7db5942015-01-28 10:07:51 -0800372 struct coda_in_hdr ih;
373 struct CodaFid VFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700374};
Tao Baod7db5942015-01-28 10:07:51 -0800375struct coda_readlink_out {
376 struct coda_out_hdr oh;
377 int count;
378 caddr_t data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700379};
380struct coda_fsync_in {
Tao Baod7db5942015-01-28 10:07:51 -0800381 struct coda_in_hdr ih;
382 struct CodaFid VFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700383};
384struct coda_fsync_out {
Tao Baod7db5942015-01-28 10:07:51 -0800385 struct coda_out_hdr out;
Ben Cheng655a7c02013-10-16 16:09:24 -0700386};
387struct coda_vget_in {
Tao Baod7db5942015-01-28 10:07:51 -0800388 struct coda_in_hdr ih;
389 struct CodaFid VFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700390};
Tao Baod7db5942015-01-28 10:07:51 -0800391struct coda_vget_out {
392 struct coda_out_hdr oh;
393 struct CodaFid VFid;
394 int vtype;
Ben Cheng655a7c02013-10-16 16:09:24 -0700395};
396struct coda_purgeuser_out {
Tao Baod7db5942015-01-28 10:07:51 -0800397 struct coda_out_hdr oh;
398 vuid_t uid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700399};
400struct coda_zapfile_out {
Tao Baod7db5942015-01-28 10:07:51 -0800401 struct coda_out_hdr oh;
402 struct CodaFid CodaFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700403};
404struct coda_zapdir_out {
Tao Baod7db5942015-01-28 10:07:51 -0800405 struct coda_out_hdr oh;
406 struct CodaFid CodaFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700407};
408struct coda_purgefid_out {
Tao Baod7db5942015-01-28 10:07:51 -0800409 struct coda_out_hdr oh;
410 struct CodaFid CodaFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700411};
412struct coda_replace_out {
Tao Baod7db5942015-01-28 10:07:51 -0800413 struct coda_out_hdr oh;
414 struct CodaFid NewFid;
Tao Baod7db5942015-01-28 10:07:51 -0800415 struct CodaFid OldFid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700416};
Ben Cheng655a7c02013-10-16 16:09:24 -0700417struct coda_open_by_fd_in {
Tao Baod7db5942015-01-28 10:07:51 -0800418 struct coda_in_hdr ih;
Tao Baod7db5942015-01-28 10:07:51 -0800419 struct CodaFid VFid;
420 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700421};
422struct coda_open_by_fd_out {
Tao Baod7db5942015-01-28 10:07:51 -0800423 struct coda_out_hdr oh;
424 int fd;
Ben Cheng655a7c02013-10-16 16:09:24 -0700425};
426struct coda_open_by_path_in {
Tao Baod7db5942015-01-28 10:07:51 -0800427 struct coda_in_hdr ih;
428 struct CodaFid VFid;
429 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700430};
431struct coda_open_by_path_out {
Tao Baod7db5942015-01-28 10:07:51 -0800432 struct coda_out_hdr oh;
433 int path;
Ben Cheng655a7c02013-10-16 16:09:24 -0700434};
Tao Baod7db5942015-01-28 10:07:51 -0800435struct coda_statfs_in {
436 struct coda_in_hdr in;
Ben Cheng655a7c02013-10-16 16:09:24 -0700437};
438struct coda_statfs_out {
Tao Baod7db5942015-01-28 10:07:51 -0800439 struct coda_out_hdr oh;
440 struct coda_statfs stat;
Ben Cheng655a7c02013-10-16 16:09:24 -0700441};
442#define CODA_NOCACHE 0x80000000
443union inputArgs {
Tao Baod7db5942015-01-28 10:07:51 -0800444 struct coda_in_hdr ih;
445 struct coda_open_in coda_open;
446 struct coda_store_in coda_store;
Tao Baod7db5942015-01-28 10:07:51 -0800447 struct coda_release_in coda_release;
448 struct coda_close_in coda_close;
449 struct coda_ioctl_in coda_ioctl;
450 struct coda_getattr_in coda_getattr;
Tao Baod7db5942015-01-28 10:07:51 -0800451 struct coda_setattr_in coda_setattr;
452 struct coda_access_in coda_access;
453 struct coda_lookup_in coda_lookup;
454 struct coda_create_in coda_create;
Tao Baod7db5942015-01-28 10:07:51 -0800455 struct coda_remove_in coda_remove;
456 struct coda_link_in coda_link;
457 struct coda_rename_in coda_rename;
458 struct coda_mkdir_in coda_mkdir;
Tao Baod7db5942015-01-28 10:07:51 -0800459 struct coda_rmdir_in coda_rmdir;
460 struct coda_symlink_in coda_symlink;
461 struct coda_readlink_in coda_readlink;
462 struct coda_fsync_in coda_fsync;
Tao Baod7db5942015-01-28 10:07:51 -0800463 struct coda_vget_in coda_vget;
464 struct coda_open_by_fd_in coda_open_by_fd;
465 struct coda_open_by_path_in coda_open_by_path;
466 struct coda_statfs_in coda_statfs;
Ben Cheng655a7c02013-10-16 16:09:24 -0700467};
468union outputArgs {
Tao Baod7db5942015-01-28 10:07:51 -0800469 struct coda_out_hdr oh;
470 struct coda_root_out coda_root;
Tao Baod7db5942015-01-28 10:07:51 -0800471 struct coda_open_out coda_open;
472 struct coda_ioctl_out coda_ioctl;
473 struct coda_getattr_out coda_getattr;
474 struct coda_lookup_out coda_lookup;
Tao Baod7db5942015-01-28 10:07:51 -0800475 struct coda_create_out coda_create;
476 struct coda_mkdir_out coda_mkdir;
477 struct coda_readlink_out coda_readlink;
478 struct coda_vget_out coda_vget;
Tao Baod7db5942015-01-28 10:07:51 -0800479 struct coda_purgeuser_out coda_purgeuser;
480 struct coda_zapfile_out coda_zapfile;
481 struct coda_zapdir_out coda_zapdir;
482 struct coda_purgefid_out coda_purgefid;
Tao Baod7db5942015-01-28 10:07:51 -0800483 struct coda_replace_out coda_replace;
484 struct coda_open_by_fd_out coda_open_by_fd;
485 struct coda_open_by_path_out coda_open_by_path;
486 struct coda_statfs_out coda_statfs;
Ben Cheng655a7c02013-10-16 16:09:24 -0700487};
488union coda_downcalls {
Tao Baod7db5942015-01-28 10:07:51 -0800489 struct coda_purgeuser_out purgeuser;
490 struct coda_zapfile_out zapfile;
Tao Baod7db5942015-01-28 10:07:51 -0800491 struct coda_zapdir_out zapdir;
492 struct coda_purgefid_out purgefid;
493 struct coda_replace_out replace;
Ben Cheng655a7c02013-10-16 16:09:24 -0700494};
495#define PIOCPARM_MASK 0x0000ffff
496struct ViceIoctl {
Tao Baod7db5942015-01-28 10:07:51 -0800497 void __user * in;
498 void __user * out;
Tao Baod7db5942015-01-28 10:07:51 -0800499 u_short in_size;
500 u_short out_size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700501};
502struct PioctlData {
Tao Baod7db5942015-01-28 10:07:51 -0800503 const char __user * path;
504 int follow;
505 struct ViceIoctl vi;
Ben Cheng655a7c02013-10-16 16:09:24 -0700506};
507#define CODA_CONTROL ".CONTROL"
508#define CODA_CONTROLLEN 8
Tao Baod7db5942015-01-28 10:07:51 -0800509#define CTL_INO - 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700510#define CODA_MOUNT_VERSION 1
Tao Baod7db5942015-01-28 10:07:51 -0800511struct coda_mount_data {
512 int version;
513 int fd;
Ben Cheng655a7c02013-10-16 16:09:24 -0700514};
Ben Cheng655a7c02013-10-16 16:09:24 -0700515#endif