9p.h (454d7dc9bc13e46084e0612076e6952c40f4afeb) | 9p.h (21cf9edf4f715b1105779236e142be756a086007) |
---|---|
1#ifndef QEMU_9P_H 2#define QEMU_9P_H 3 4#include <dirent.h> 5#include <utime.h> 6#include <sys/resource.h> 7#include "fsdev/file-op-9p.h" 8#include "fsdev/9p-iov-marshal.h" --- 103 unchanged lines hidden (view full) --- 112 113/* 114 * ample room for Twrite/Rread header 115 * size[4] Tread/Twrite tag[2] fid[4] offset[8] count[4] 116 */ 117#define P9_IOHDRSZ 24 118 119typedef struct V9fsPDU V9fsPDU; | 1#ifndef QEMU_9P_H 2#define QEMU_9P_H 3 4#include <dirent.h> 5#include <utime.h> 6#include <sys/resource.h> 7#include "fsdev/file-op-9p.h" 8#include "fsdev/9p-iov-marshal.h" --- 103 unchanged lines hidden (view full) --- 112 113/* 114 * ample room for Twrite/Rread header 115 * size[4] Tread/Twrite tag[2] fid[4] offset[8] count[4] 116 */ 117#define P9_IOHDRSZ 24 118 119typedef struct V9fsPDU V9fsPDU; |
120struct V9fsState; | 120typedef struct V9fsState V9fsState; |
121 122typedef struct { 123 uint32_t size_le; 124 uint8_t id; 125 uint16_t tag_le; 126} QEMU_PACKED P9MsgHeader; 127/* According to the specification, 9p messages start with a 7-byte header. 128 * Since most of the code uses this header size in literal form, we must be 129 * sure this is indeed the case. 130 */ 131QEMU_BUILD_BUG_ON(sizeof(P9MsgHeader) != 7); 132 133struct V9fsPDU 134{ 135 uint32_t size; 136 uint16_t tag; 137 uint8_t id; 138 uint8_t cancelled; 139 CoQueue complete; | 121 122typedef struct { 123 uint32_t size_le; 124 uint8_t id; 125 uint16_t tag_le; 126} QEMU_PACKED P9MsgHeader; 127/* According to the specification, 9p messages start with a 7-byte header. 128 * Since most of the code uses this header size in literal form, we must be 129 * sure this is indeed the case. 130 */ 131QEMU_BUILD_BUG_ON(sizeof(P9MsgHeader) != 7); 132 133struct V9fsPDU 134{ 135 uint32_t size; 136 uint16_t tag; 137 uint8_t id; 138 uint8_t cancelled; 139 CoQueue complete; |
140 struct V9fsState *s; | 140 V9fsState *s; |
141 QLIST_ENTRY(V9fsPDU) next; 142 uint32_t idx; 143}; 144 145 146/* FIXME 147 * 1) change user needs to set groups and stuff 148 */ --- 76 unchanged lines hidden (view full) --- 225 int open_flags; 226 uid_t uid; 227 int ref; 228 int clunked; 229 V9fsFidState *next; 230 V9fsFidState *rclm_lst; 231}; 232 | 141 QLIST_ENTRY(V9fsPDU) next; 142 uint32_t idx; 143}; 144 145 146/* FIXME 147 * 1) change user needs to set groups and stuff 148 */ --- 76 unchanged lines hidden (view full) --- 225 int open_flags; 226 uid_t uid; 227 int ref; 228 int clunked; 229 V9fsFidState *next; 230 V9fsFidState *rclm_lst; 231}; 232 |
233typedef struct V9fsState | 233struct V9fsState |
234{ 235 QLIST_HEAD(, V9fsPDU) free_list; 236 QLIST_HEAD(, V9fsPDU) active_list; 237 V9fsFidState *fid_list; 238 FileOperations *ops; 239 FsContext ctx; 240 char *tag; 241 enum p9_proto_version proto_version; --- 4 unchanged lines hidden (view full) --- 246 * lock ensuring atomic path update 247 * on rename. 248 */ 249 CoRwlock rename_lock; 250 int32_t root_fid; 251 Error *migration_blocker; 252 V9fsConf fsconf; 253 V9fsQID root_qid; | 234{ 235 QLIST_HEAD(, V9fsPDU) free_list; 236 QLIST_HEAD(, V9fsPDU) active_list; 237 V9fsFidState *fid_list; 238 FileOperations *ops; 239 FsContext ctx; 240 char *tag; 241 enum p9_proto_version proto_version; --- 4 unchanged lines hidden (view full) --- 246 * lock ensuring atomic path update 247 * on rename. 248 */ 249 CoRwlock rename_lock; 250 int32_t root_fid; 251 Error *migration_blocker; 252 V9fsConf fsconf; 253 V9fsQID root_qid; |
254} V9fsState; | 254}; |
255 256/* 9p2000.L open flags */ 257#define P9_DOTL_RDONLY 00000000 258#define P9_DOTL_WRONLY 00000001 259#define P9_DOTL_RDWR 00000002 260#define P9_DOTL_NOACCESS 00000003 261#define P9_DOTL_CREATE 00000100 262#define P9_DOTL_EXCL 00000200 --- 116 unchanged lines hidden --- | 255 256/* 9p2000.L open flags */ 257#define P9_DOTL_RDONLY 00000000 258#define P9_DOTL_WRONLY 00000001 259#define P9_DOTL_RDWR 00000002 260#define P9_DOTL_NOACCESS 00000003 261#define P9_DOTL_CREATE 00000100 262#define P9_DOTL_EXCL 00000200 --- 116 unchanged lines hidden --- |