mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
9p: introduce the V9fsDir type
If we are to switch back to readdir(), we need a more complex type than DIR * to be able to serialize concurrent accesses to the directory stream. This patch introduces a placeholder type and fixes all users. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
This commit is contained in:
parent
8762a46d36
commit
f314ea4e30
5 changed files with 39 additions and 35 deletions
|
@ -167,13 +167,17 @@ typedef struct V9fsXattr
|
|||
int flags;
|
||||
} V9fsXattr;
|
||||
|
||||
typedef struct V9fsDir {
|
||||
DIR *stream;
|
||||
} V9fsDir;
|
||||
|
||||
/*
|
||||
* Filled by fs driver on open and other
|
||||
* calls.
|
||||
*/
|
||||
union V9fsFidOpenState {
|
||||
int fd;
|
||||
DIR *dir;
|
||||
V9fsDir dir;
|
||||
V9fsXattr xattr;
|
||||
/*
|
||||
* private pointer for fs drivers, that
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue