aboutsummaryrefslogtreecommitdiff
path: root/fsdev/qemu-fsdev.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2019-05-17 17:34:48 +0200
committerGreg Kurz <groug@kaod.org>2019-05-17 17:34:48 +0200
commit202324357397435bb572734e3fd4e1eed86b04f9 (patch)
tree431010b9d197c30c60c90e93712822a5732e7218 /fsdev/qemu-fsdev.c
parent778f0fad5f93224b8657831cf82fa3bb644f21e7 (diff)
fsdev: Move some types definition to qemu-fsdev.c
It would make sense for these types to be defined in a header file if we had an API for fsdrivers to register themselves. In practice, we only have three of them and it is very unlikely we add new ones since the future of file sharing between host and guest is the upcoming virtio-fs. Move the types to qemu-fsdev.c instead since they are only used there. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'fsdev/qemu-fsdev.c')
-rw-r--r--fsdev/qemu-fsdev.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c
index 54cb36a212..e972bd698c 100644
--- a/fsdev/qemu-fsdev.c
+++ b/fsdev/qemu-fsdev.c
@@ -18,6 +18,29 @@
#include "qemu/error-report.h"
#include "qemu/option.h"
+/*
+ * A table to store the various file systems and their callback operations.
+ * -----------------
+ * fstype | ops
+ * -----------------
+ * local | local_ops
+ * . |
+ * . |
+ * . |
+ * . |
+ * -----------------
+ * etc
+ */
+typedef struct FsDriverTable {
+ const char *name;
+ FileOperations *ops;
+} FsDriverTable;
+
+typedef struct FsDriverListEntry {
+ FsDriverEntry fse;
+ QTAILQ_ENTRY(FsDriverListEntry) next;
+} FsDriverListEntry;
+
static QTAILQ_HEAD(, FsDriverListEntry) fsdriver_entries =
QTAILQ_HEAD_INITIALIZER(fsdriver_entries);