diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-09-02 11:09:06 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-09-08 22:56:41 +0530 |
commit | d62dbb51f76ddcec95822fe196813edd46ef35b9 (patch) | |
tree | 12e174ec469bd08668554a4e4e21b14e9044f18c /hw/virtio-9p.h | |
parent | 771e9d4c1cd9ade4bd9b46a9c4367997d1b95fd3 (diff) |
virtio-9p: Add fidtype so that we can do type specific operation
We want to add type specific operation during read/write
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/virtio-9p.h')
-rw-r--r-- | hw/virtio-9p.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/hw/virtio-9p.h b/hw/virtio-9p.h index cd7c67ed46..faca6b2e94 100644 --- a/hw/virtio-9p.h +++ b/hw/virtio-9p.h @@ -155,12 +155,32 @@ typedef struct V9fsStat int32_t n_muid; } V9fsStat; +enum { + P9_FID_NONE = 0, + P9_FID_FILE, + P9_FID_DIR, + P9_FID_XATTR, +}; + +typedef struct V9fsXattr +{ + int64_t copied_len; + int64_t len; + void *value; + V9fsString name; + int flags; +} V9fsXattr; + struct V9fsFidState { + int fid_type; int32_t fid; V9fsString path; - int fd; - DIR *dir; + union { + int fd; + DIR *dir; + V9fsXattr xattr; + } fs; uid_t uid; V9fsFidState *next; }; |