Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 1 | /* |
Greg Kurz | af8b38b | 2016-06-06 11:52:34 +0200 | [diff] [blame] | 2 | * 9p |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 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 | |
Peter Maydell | fbc0412 | 2016-01-26 18:17:10 +0000 | [diff] [blame] | 8 | #include "qemu/osdep.h" |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 9 | #include "qemu/config-file.h" |
| 10 | #include "qemu/option.h" |
| 11 | #include "qemu/module.h" |
Pradeep Jagadeesh | a2a7862 | 2017-02-28 10:31:46 +0100 | [diff] [blame] | 12 | #include "qemu/throttle-options.h" |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 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, |
Antonios Motakis | 1a6ed33 | 2019-10-10 11:36:05 +0200 | [diff] [blame] | 34 | }, { |
| 35 | .name = "multidevs", |
| 36 | .type = QEMU_OPT_STRING, |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 37 | }, { |
| 38 | .name = "socket", |
| 39 | .type = QEMU_OPT_STRING, |
| 40 | }, { |
| 41 | .name = "sock_fd", |
| 42 | .type = QEMU_OPT_NUMBER, |
Tobias Schramm | b96feb2 | 2017-06-29 15:11:50 +0200 | [diff] [blame] | 43 | }, { |
| 44 | .name = "fmode", |
| 45 | .type = QEMU_OPT_NUMBER, |
| 46 | }, { |
| 47 | .name = "dmode", |
| 48 | .type = QEMU_OPT_NUMBER, |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 49 | }, |
Pradeep Jagadeesh | a2a7862 | 2017-02-28 10:31:46 +0100 | [diff] [blame] | 50 | |
| 51 | THROTTLE_OPTS, |
| 52 | |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 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 | }, { |
Antonios Motakis | 1a6ed33 | 2019-10-10 11:36:05 +0200 | [diff] [blame] | 81 | .name = "multidevs", |
| 82 | .type = QEMU_OPT_STRING, |
| 83 | }, { |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 84 | .name = "socket", |
| 85 | .type = QEMU_OPT_STRING, |
| 86 | }, { |
| 87 | .name = "sock_fd", |
| 88 | .type = QEMU_OPT_NUMBER, |
Tobias Schramm | b96feb2 | 2017-06-29 15:11:50 +0200 | [diff] [blame] | 89 | }, { |
| 90 | .name = "fmode", |
| 91 | .type = QEMU_OPT_NUMBER, |
| 92 | }, { |
| 93 | .name = "dmode", |
| 94 | .type = QEMU_OPT_NUMBER, |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 95 | }, |
| 96 | |
| 97 | { /*End of list */ } |
| 98 | }, |
| 99 | }; |
| 100 | |
| 101 | static void fsdev_register_config(void) |
| 102 | { |
| 103 | qemu_add_opts(&qemu_fsdev_opts); |
| 104 | qemu_add_opts(&qemu_virtfs_opts); |
| 105 | } |
Eduardo Habkost | 34294e2 | 2016-02-16 18:59:07 -0200 | [diff] [blame] | 106 | opts_init(fsdev_register_config); |