diff options
author | M. Mohan Kumar <mohan@in.ibm.com> | 2011-10-12 19:11:24 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-10-15 15:30:27 +0530 |
commit | 9844081bcaf6e0fcfafa91441dde0ae9d2c17e28 (patch) | |
tree | cb87960b1be3c9c1e34b55751ebea8a90deeaa81 /hw/9pfs/virtio-9p.h | |
parent | a2f507d9089f57525d58cd0852c6bea6720074e5 (diff) |
hw/9pfs: Add open flag mapping
Some of the flags are OS/arch dependent we need to use
9P defined value on wire,
Based on the original patch from Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/virtio-9p.h')
-rw-r--r-- | hw/9pfs/virtio-9p.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h index e5cf78c06a..e94041e4f8 100644 --- a/hw/9pfs/virtio-9p.h +++ b/hw/9pfs/virtio-9p.h @@ -352,6 +352,30 @@ typedef struct V9fsMkState { V9fsString fullname; } V9fsMkState; +/* 9p2000.L open flags */ +#define P9_DOTL_RDONLY 00000000 +#define P9_DOTL_WRONLY 00000001 +#define P9_DOTL_RDWR 00000002 +#define P9_DOTL_NOACCESS 00000003 +#define P9_DOTL_CREATE 00000100 +#define P9_DOTL_EXCL 00000200 +#define P9_DOTL_NOCTTY 00000400 +#define P9_DOTL_TRUNC 00001000 +#define P9_DOTL_APPEND 00002000 +#define P9_DOTL_NONBLOCK 00004000 +#define P9_DOTL_DSYNC 00010000 +#define P9_DOTL_FASYNC 00020000 +#define P9_DOTL_DIRECT 00040000 +#define P9_DOTL_LARGEFILE 00100000 +#define P9_DOTL_DIRECTORY 00200000 +#define P9_DOTL_NOFOLLOW 00400000 +#define P9_DOTL_NOATIME 01000000 +#define P9_DOTL_CLOEXEC 02000000 +#define P9_DOTL_SYNC 04000000 + +/* 9p2000.L at flags */ +#define P9_DOTL_AT_REMOVEDIR 0x200 + /* 9P2000.L lock type */ #define P9_LOCK_TYPE_RDLCK 0 #define P9_LOCK_TYPE_WRLCK 1 |