diff options
Diffstat (limited to 'src/kernel/vfs/request.h')
-rw-r--r-- | src/kernel/vfs/request.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/kernel/vfs/request.h b/src/kernel/vfs/request.h index d6facfd..484fdd7 100644 --- a/src/kernel/vfs/request.h +++ b/src/kernel/vfs/request.h @@ -37,20 +37,22 @@ struct VfsBackend { /* describes an in-progress vfs call */ struct VfsReq { enum vfs_op type; - struct { - bool kern; // if false: use .buf ; if true: use .buf_kern - union { - char __user *buf; - char *buf_kern; - }; - size_t len; - } input; - struct { - char __user *buf; - size_t len; - } output; - - void __user *id, *id2; // handle.file.id + + /* "kernel" input - an allocation owned by this struct, contains a NUL + * terminated string. the NUL isn't counted in the kinlen (for compat + * with old code). used for the path in open() */ + char *kin; + size_t kinlen; + + /* user inputs and outputs - just point to some buffer in the caller */ + char __user *uin; + size_t uinlen; + char __user *out; + size_t outlen; + + /* those correspond to handle.file.id + * id2 is used for duplex() */ + void __user *id, *id2; long offset; int flags; |