diff options
author | Greg Kurz <gkurz@linux.vnet.ibm.com> | 2016-06-06 11:52:34 +0200 |
---|---|---|
committer | Greg Kurz <gkurz@linux.vnet.ibm.com> | 2016-06-06 11:52:34 +0200 |
commit | 635324e83e238598e86628dba5ab62ce910e6f72 (patch) | |
tree | 959af05a3fb65f914171fa2c343f8b3fef9130b6 /hw/9pfs/9p-handle.c | |
parent | 7cde47d4a89d5efefcc805788bc29133f4f3c5c7 (diff) |
9p: switch back to readdir()
This patch changes the 9p code to use readdir() again instead of
readdir_r(), which is deprecated in glibc 2.24.
All the locking was put in place by a previous patch.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/9p-handle.c')
-rw-r--r-- | hw/9pfs/9p-handle.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/9pfs/9p-handle.c b/hw/9pfs/9p-handle.c index c5df053007..3d77594f92 100644 --- a/hw/9pfs/9p-handle.c +++ b/hw/9pfs/9p-handle.c @@ -149,11 +149,9 @@ static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs) return telldir(fs->dir.stream); } -static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs, - struct dirent *entry, - struct dirent **result) +static struct dirent *handle_readdir(FsContext *ctx, V9fsFidOpenState *fs) { - return readdir_r(fs->dir.stream, entry, result); + return readdir(fs->dir.stream); } static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off) @@ -681,7 +679,7 @@ FileOperations handle_ops = { .opendir = handle_opendir, .rewinddir = handle_rewinddir, .telldir = handle_telldir, - .readdir_r = handle_readdir_r, + .readdir = handle_readdir, .seekdir = handle_seekdir, .preadv = handle_preadv, .pwritev = handle_pwritev, |