blob: 7c31ffffafb53551857fb30c242e2301c1ab7e53 [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,
34
35 }, {
36 .name = "socket",
37 .type = QEMU_OPT_STRING,
38 }, {
39 .name = "sock_fd",
40 .type = QEMU_OPT_NUMBER,
Tobias Schrammb96feb22017-06-29 15:11:50 +020041 }, {
42 .name = "fmode",
43 .type = QEMU_OPT_NUMBER,
44 }, {
45 .name = "dmode",
46 .type = QEMU_OPT_NUMBER,
Paolo Bonzini4d454572012-11-26 16:03:42 +010047 },
Pradeep Jagadeesha2a78622017-02-28 10:31:46 +010048
49 THROTTLE_OPTS,
50
Paolo Bonzini4d454572012-11-26 16:03:42 +010051 { /*End of list */ }
52 },
53};
54
55static QemuOptsList qemu_virtfs_opts = {
56 .name = "virtfs",
57 .implied_opt_name = "fsdriver",
58 .head = QTAILQ_HEAD_INITIALIZER(qemu_virtfs_opts.head),
59 .desc = {
60 {
61 .name = "fsdriver",
62 .type = QEMU_OPT_STRING,
63 }, {
64 .name = "path",
65 .type = QEMU_OPT_STRING,
66 }, {
67 .name = "mount_tag",
68 .type = QEMU_OPT_STRING,
69 }, {
70 .name = "security_model",
71 .type = QEMU_OPT_STRING,
72 }, {
73 .name = "writeout",
74 .type = QEMU_OPT_STRING,
75 }, {
76 .name = "readonly",
77 .type = QEMU_OPT_BOOL,
78 }, {
79 .name = "socket",
80 .type = QEMU_OPT_STRING,
81 }, {
82 .name = "sock_fd",
83 .type = QEMU_OPT_NUMBER,
Tobias Schrammb96feb22017-06-29 15:11:50 +020084 }, {
85 .name = "fmode",
86 .type = QEMU_OPT_NUMBER,
87 }, {
88 .name = "dmode",
89 .type = QEMU_OPT_NUMBER,
Paolo Bonzini4d454572012-11-26 16:03:42 +010090 },
91
92 { /*End of list */ }
93 },
94};
95
96static void fsdev_register_config(void)
97{
98 qemu_add_opts(&qemu_fsdev_opts);
99 qemu_add_opts(&qemu_virtfs_opts);
100}
Eduardo Habkost34294e22016-02-16 18:59:07 -0200101opts_init(fsdev_register_config);