mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
771e9d4c1c
commit
d62dbb51f7
2 changed files with 78 additions and 56 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue