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:
Aneesh Kumar K.V 2010-09-02 11:09:06 +05:30
parent 771e9d4c1c
commit d62dbb51f7
2 changed files with 78 additions and 56 deletions

View file

@ -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;
};