[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/16] hw/9pfs: Update P9_FILE_ID to support Windows
From: |
Bin Meng |
Subject: |
[PATCH 05/16] hw/9pfs: Update P9_FILE_ID to support Windows |
Date: |
Mon, 24 Oct 2022 12:57:48 +0800 |
On Windows P9_FILE_ID points to a file handle.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
hw/9pfs/9p-file-id.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/9pfs/9p-file-id.h b/hw/9pfs/9p-file-id.h
index 60cbfbf4dd..00903048e6 100644
--- a/hw/9pfs/9p-file-id.h
+++ b/hw/9pfs/9p-file-id.h
@@ -11,11 +11,19 @@
/*
* 9pfs file id
*
- * This is file descriptor on POSIX platforms
+ * This is file descriptor on POSIX platforms, handle on Windows
*/
+#ifndef CONFIG_WIN32
typedef int P9_FILE_ID;
+#else
+typedef HANDLE P9_FILE_ID;
+#endif
/* invalid value for P9_FILE_ID */
+#ifndef CONFIG_WIN32
#define P9_INVALID_FILE -1
+#else
+#define P9_INVALID_FILE INVALID_HANDLE_VALUE
+#endif
#endif
--
2.25.1
- [PATCH 00/16] hw/9pfs: Add 9pfs support for Windows, Bin Meng, 2022/10/24
- [PATCH 01/16] qemu/xattr.h: Exclude <sys/xattr.h> for Windows, Bin Meng, 2022/10/24
- [PATCH 03/16] hw/9pfs: Replace the direct call to xxxat() APIs with a wrapper, Bin Meng, 2022/10/24
- [PATCH 02/16] hw/9pfs: Drop unnecessary *xattr wrapper API declarations, Bin Meng, 2022/10/24
- [PATCH 05/16] hw/9pfs: Update P9_FILE_ID to support Windows,
Bin Meng <=
- [PATCH 06/16] hw/9pfs: Add missing definitions for Windows, Bin Meng, 2022/10/24
- [PATCH 12/16] hw/9pfs: Translate Windows errno to Linux value, Bin Meng, 2022/10/24
- [PATCH 07/16] hw/9pfs: Implement Windows specific utilities functions for 9pfs, Bin Meng, 2022/10/24
- [PATCH 10/16] hw/9pfs: Update the local fs driver to support Windows, Bin Meng, 2022/10/24
- [PATCH 04/16] hw/9pfs: Introduce an opaque type 9P_FILE_ID, Bin Meng, 2022/10/24
- [PATCH 08/16] hw/9pfs: Handle current directory offset for Windows, Bin Meng, 2022/10/24
- [PATCH 09/16] hw/9pfs: Disable unsupported flags and features for Windows, Bin Meng, 2022/10/24
- [PATCH 11/16] hw/9pfs: Add Linux error number definition, Bin Meng, 2022/10/24
- [PATCH 13/16] fsdev: Disable proxy fs driver on Windows, Bin Meng, 2022/10/24
- [PATCH 15/16] tests/qtest: virtio-9p-test: Adapt the case for win32, Bin Meng, 2022/10/24