diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-10-25 12:10:40 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-10-31 12:34:17 +0530 |
commit | cc720ddb5435ceaa4cda397ca3e74b099752b763 (patch) | |
tree | d23fdd287d712eaf5465cb3a8a73963234e15c09 /hw/9pfs/virtio-9p.h | |
parent | 2c74c2cb4bedddbfa67628fbd5f9273b4e0e9903 (diff) | |
download | qemu-cc720ddb5435ceaa4cda397ca3e74b099752b763.tar.gz qemu-cc720ddb5435ceaa4cda397ca3e74b099752b763.tar.bz2 qemu-cc720ddb5435ceaa4cda397ca3e74b099752b763.zip |
hw/9pfs: Abstract open state of fid to V9fsFidOpenState
To implement synthetic file system in Qemu we may not really
require file descriptor and Dir *. Make generic code use
V9fsFidOpenState instead.
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 | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h index 802f5809d1..6273b8589a 100644 --- a/hw/9pfs/virtio-9p.h +++ b/hw/9pfs/virtio-9p.h @@ -204,20 +204,23 @@ typedef struct V9fsXattr int flags; } V9fsXattr; +/* + * Filled by fs driver on open and other + * calls. + */ +union V9fsFidOpenState { + int fd; + DIR *dir; + V9fsXattr xattr; +}; + struct V9fsFidState { int fid_type; int32_t fid; V9fsPath path; - union { - int fd; - DIR *dir; - V9fsXattr xattr; - } fs; - union { - int fd; - DIR *dir; - } fs_reclaim; + V9fsFidOpenState fs; + V9fsFidOpenState fs_reclaim; int flags; int open_flags; uid_t uid; |