xref: /openbmc/qemu/fsdev/qemu-fsdev.h (revision 1be82d89)
1 /*
2  * 9p
3  *
4  * Copyright IBM, Corp. 2010
5  *
6  * Authors:
7  *  Gautham R Shenoy <ego@in.ibm.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  *
12  */
13 #ifndef QEMU_FSDEV_H
14 #define QEMU_FSDEV_H
15 #include "file-op-9p.h"
16 
17 
18 /*
19  * A table to store the various file systems and their callback operations.
20  * -----------------
21  * fstype | ops
22  * -----------------
23  *  local | local_ops
24  *  .     |
25  *  .     |
26  *  .     |
27  *  .     |
28  * -----------------
29  *  etc
30  */
31 typedef struct FsDriverTable {
32     const char *name;
33     FileOperations *ops;
34 } FsDriverTable;
35 
36 typedef struct FsDriverListEntry {
37     FsDriverEntry fse;
38     QTAILQ_ENTRY(FsDriverListEntry) next;
39 } FsDriverListEntry;
40 
41 int qemu_fsdev_add(QemuOpts *opts, Error **errp);
42 FsDriverEntry *get_fsdev_fsentry(char *id);
43 extern FileOperations local_ops;
44 extern FileOperations handle_ops;
45 extern FileOperations synth_ops;
46 extern FileOperations proxy_ops;
47 #endif
48