xref: /openbmc/qemu/fsdev/qemu-fsdev-opts.c (revision ea0ec714)
1 /*
2  * 9p
3  *
4  * This work is licensed under the terms of the GNU GPL, version 2 or
5  * later.  See the COPYING file in the top-level directory.
6  */
7 
8 #include "qemu/osdep.h"
9 #include "qemu/config-file.h"
10 #include "qemu/option.h"
11 #include "qemu/module.h"
12 #include "qemu/throttle-options.h"
13 
14 static QemuOptsList qemu_fsdev_opts = {
15     .name = "fsdev",
16     .implied_opt_name = "fsdriver",
17     .head = QTAILQ_HEAD_INITIALIZER(qemu_fsdev_opts.head),
18     .desc = {
19         {
20             .name = "fsdriver",
21             .type = QEMU_OPT_STRING,
22         }, {
23             .name = "path",
24             .type = QEMU_OPT_STRING,
25         }, {
26             .name = "security_model",
27             .type = QEMU_OPT_STRING,
28         }, {
29             .name = "writeout",
30             .type = QEMU_OPT_STRING,
31         }, {
32             .name = "readonly",
33             .type = QEMU_OPT_BOOL,
34         }, {
35             .name = "multidevs",
36             .type = QEMU_OPT_STRING,
37         }, {
38             .name = "socket",
39             .type = QEMU_OPT_STRING,
40         }, {
41             .name = "sock_fd",
42             .type = QEMU_OPT_NUMBER,
43         }, {
44             .name = "fmode",
45             .type = QEMU_OPT_NUMBER,
46         }, {
47             .name = "dmode",
48             .type = QEMU_OPT_NUMBER,
49         },
50 
51         THROTTLE_OPTS,
52 
53         { /*End of list */ }
54     },
55 };
56 
57 static QemuOptsList qemu_virtfs_opts = {
58     .name = "virtfs",
59     .implied_opt_name = "fsdriver",
60     .head = QTAILQ_HEAD_INITIALIZER(qemu_virtfs_opts.head),
61     .desc = {
62         {
63             .name = "fsdriver",
64             .type = QEMU_OPT_STRING,
65         }, {
66             .name = "path",
67             .type = QEMU_OPT_STRING,
68         }, {
69             .name = "mount_tag",
70             .type = QEMU_OPT_STRING,
71         }, {
72             .name = "security_model",
73             .type = QEMU_OPT_STRING,
74         }, {
75             .name = "writeout",
76             .type = QEMU_OPT_STRING,
77         }, {
78             .name = "readonly",
79             .type = QEMU_OPT_BOOL,
80         }, {
81             .name = "multidevs",
82             .type = QEMU_OPT_STRING,
83         }, {
84             .name = "socket",
85             .type = QEMU_OPT_STRING,
86         }, {
87             .name = "sock_fd",
88             .type = QEMU_OPT_NUMBER,
89         }, {
90             .name = "fmode",
91             .type = QEMU_OPT_NUMBER,
92         }, {
93             .name = "dmode",
94             .type = QEMU_OPT_NUMBER,
95         },
96 
97         { /*End of list */ }
98     },
99 };
100 
fsdev_register_config(void)101 static void fsdev_register_config(void)
102 {
103     qemu_add_opts(&qemu_fsdev_opts);
104     qemu_add_opts(&qemu_virtfs_opts);
105 }
106 opts_init(fsdev_register_config);
107