]> git.ipfire.org Git - thirdparty/qemu.git/commit
9pfs: Don't use file descriptors in core code
authorGreg Kurz <groug@kaod.org>
Wed, 12 Mar 2025 15:29:28 +0000 (16:29 +0100)
committerChristian Schoenebeck <qemu_oss@crudebyte.com>
Mon, 5 May 2025 09:28:29 +0000 (11:28 +0200)
commitf2bb367d2b265c6c0ead1e0d4a8f7c43310b3107
treed38b516c4e75e3c2efda089ff547bc0d23091078
parent4f82ce8cd94f2601fb2b2e4cfe0cf5b44131817e
9pfs: Don't use file descriptors in core code

v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid
has a valid file descriptor or directory stream. Even though the fields
are accessible, this is an implementation detail of the local backend
that should not be manipulated directly by the server code.

Abstract that with a new has_valid_file_handle() backend operation.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20250312152933.383967-3-groug@kaod.org>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
fsdev/file-op-9p.h
hw/9pfs/9p-local.c
hw/9pfs/9p-synth.c
hw/9pfs/9p.c