target/ppc: Move helper_regs.h functions out-of-line
[qemu/ar7.git] / fsdev / 9p-marshal.h
blobceaf2f521ec453a141db3138e0ae339dfb16dac3
1 #ifndef QEMU_9P_MARSHAL_H
2 #define QEMU_9P_MARSHAL_H
4 typedef struct V9fsString {
5 uint16_t size;
6 char *data;
7 } V9fsString;
9 typedef struct V9fsQID {
10 uint8_t type;
11 uint32_t version;
12 uint64_t path;
13 } V9fsQID;
15 typedef struct V9fsStat {
16 int16_t size;
17 int16_t type;
18 int32_t dev;
19 V9fsQID qid;
20 int32_t mode;
21 int32_t atime;
22 int32_t mtime;
23 int64_t length;
24 V9fsString name;
25 V9fsString uid;
26 V9fsString gid;
27 V9fsString muid;
28 /* 9p2000.u */
29 V9fsString extension;
30 int32_t n_uid;
31 int32_t n_gid;
32 int32_t n_muid;
33 } V9fsStat;
35 typedef struct V9fsIattr {
36 int32_t valid;
37 int32_t mode;
38 int32_t uid;
39 int32_t gid;
40 int64_t size;
41 int64_t atime_sec;
42 int64_t atime_nsec;
43 int64_t mtime_sec;
44 int64_t mtime_nsec;
45 } V9fsIattr;
47 typedef struct V9fsStatDotl {
48 uint64_t st_result_mask;
49 V9fsQID qid;
50 uint32_t st_mode;
51 uint32_t st_uid;
52 uint32_t st_gid;
53 uint64_t st_nlink;
54 uint64_t st_rdev;
55 uint64_t st_size;
56 uint64_t st_blksize;
57 uint64_t st_blocks;
58 uint64_t st_atime_sec;
59 uint64_t st_atime_nsec;
60 uint64_t st_mtime_sec;
61 uint64_t st_mtime_nsec;
62 uint64_t st_ctime_sec;
63 uint64_t st_ctime_nsec;
64 uint64_t st_btime_sec;
65 uint64_t st_btime_nsec;
66 uint64_t st_gen;
67 uint64_t st_data_version;
68 } V9fsStatDotl;
70 static inline void v9fs_string_init(V9fsString *str)
72 str->data = NULL;
73 str->size = 0;
75 void v9fs_string_free(V9fsString *str);
76 void v9fs_string_sprintf(V9fsString *str, const char *fmt, ...);
77 void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs);
79 #endif