blob: 07a18c6e48d3122d69e21a486008ee539cfcafeb [file] [log] [blame]
Paolo Bonzini4d454572012-11-26 16:03:42 +01001/*
Greg Kurzaf8b38b2016-06-06 11:52:34 +02002 * 9p
Paolo Bonzini4d454572012-11-26 16:03:42 +01003 *
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
Peter Maydellfbc04122016-01-26 18:17:10 +00008#include "qemu/osdep.h"
Paolo Bonzini4d454572012-11-26 16:03:42 +01009#include "qemu/config-file.h"
10#include "qemu/option.h"
11#include "qemu/module.h"
Pradeep Jagadeesha2a78622017-02-28 10:31:46 +010012#include "qemu/throttle-options.h"
Paolo Bonzini4d454572012-11-26 16:03:42 +010013
14static 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,
Antonios Motakis1a6ed332019-10-10 11:36:05 +020034 }, {
35 .name = "multidevs",
36 .type = QEMU_OPT_STRING,
Paolo Bonzini4d454572012-11-26 16:03:42 +010037 }, {
38 .name = "socket",
39 .type = QEMU_OPT_STRING,
40 }, {
41 .name = "sock_fd",
42 .type = QEMU_OPT_NUMBER,
Tobias Schrammb96feb22017-06-29 15:11:50 +020043 }, {
44 .name = "fmode",
45 .type = QEMU_OPT_NUMBER,
46 }, {
47 .name = "dmode",
48 .type = QEMU_OPT_NUMBER,
Paolo Bonzini4d454572012-11-26 16:03:42 +010049 },
Pradeep Jagadeesha2a78622017-02-28 10:31:46 +010050
51 THROTTLE_OPTS,
52
Paolo Bonzini4d454572012-11-26 16:03:42 +010053 { /*End of list */ }
54 },
55};
56
57static 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 }, {
Antonios Motakis1a6ed332019-10-10 11:36:05 +020081 .name = "multidevs",
82 .type = QEMU_OPT_STRING,
83 }, {
Paolo Bonzini4d454572012-11-26 16:03:42 +010084 .name = "socket",
85 .type = QEMU_OPT_STRING,
86 }, {
87 .name = "sock_fd",
88 .type = QEMU_OPT_NUMBER,
Tobias Schrammb96feb22017-06-29 15:11:50 +020089 }, {
90 .name = "fmode",
91 .type = QEMU_OPT_NUMBER,
92 }, {
93 .name = "dmode",
94 .type = QEMU_OPT_NUMBER,
Paolo Bonzini4d454572012-11-26 16:03:42 +010095 },
96
97 { /*End of list */ }
98 },
99};
100
101static void fsdev_register_config(void)
102{
103 qemu_add_opts(&qemu_fsdev_opts);
104 qemu_add_opts(&qemu_virtfs_opts);
105}
Eduardo Habkost34294e22016-02-16 18:59:07 -0200106opts_init(fsdev_register_config);