From 8b8882722210334f19b41950c82c529e33f97b00 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Sun, 4 Dec 2011 22:35:28 +0530 Subject: hw/9pfs: Use the correct file descriptor in Fsdriver Callback Fsdriver callback that operate on file descriptor need to differentiate between directory fd and file fd. Based on the original patch from Sassan Panahinejad Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-synth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hw/9pfs/virtio-9p-synth.c') diff --git a/hw/9pfs/virtio-9p-synth.c b/hw/9pfs/virtio-9p-synth.c index f573616363..92e0b09d38 100644 --- a/hw/9pfs/virtio-9p-synth.c +++ b/hw/9pfs/virtio-9p-synth.c @@ -166,7 +166,7 @@ static int v9fs_synth_lstat(FsContext *fs_ctx, return 0; } -static int v9fs_synth_fstat(FsContext *fs_ctx, +static int v9fs_synth_fstat(FsContext *fs_ctx, int fid_type, V9fsFidOpenState *fs, struct stat *stbuf) { V9fsSynthOpenState *synth_open = fs->private; @@ -414,7 +414,8 @@ static int v9fs_synth_remove(FsContext *ctx, const char *path) return -1; } -static int v9fs_synth_fsync(FsContext *ctx, V9fsFidOpenState *fs, int datasync) +static int v9fs_synth_fsync(FsContext *ctx, int fid_type, + V9fsFidOpenState *fs, int datasync) { errno = ENOSYS; return 0; -- cgit v1.2.1