diff options
| author | Greg Kurz <groug@kaod.org> | 2025-03-12 16:29:28 +0100 |
|---|---|---|
| committer | Christian Schoenebeck <qemu_oss@crudebyte.com> | 2025-05-05 11:28:29 +0200 |
| commit | f2bb367d2b265c6c0ead1e0d4a8f7c43310b3107 (patch) | |
| tree | d38b516c4e75e3c2efda089ff547bc0d23091078 /fsdev | |
| parent | 4f82ce8cd94f2601fb2b2e4cfe0cf5b44131817e (diff) | |
| download | focaccia-qemu-f2bb367d2b265c6c0ead1e0d4a8f7c43310b3107.tar.gz focaccia-qemu-f2bb367d2b265c6c0ead1e0d4a8f7c43310b3107.zip | |
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>
Diffstat (limited to 'fsdev')
| -rw-r--r-- | fsdev/file-op-9p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h index 4997677460..b815cea44e 100644 --- a/fsdev/file-op-9p.h +++ b/fsdev/file-op-9p.h @@ -164,6 +164,7 @@ struct FileOperations { int (*renameat)(FsContext *ctx, V9fsPath *olddir, const char *old_name, V9fsPath *newdir, const char *new_name); int (*unlinkat)(FsContext *ctx, V9fsPath *dir, const char *name, int flags); + bool (*has_valid_file_handle)(int fid_type, V9fsFidOpenState *fs); }; #endif |