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, |
| 34 | |
| 35 | }, { |
| 36 | .name = "socket", |
| 37 | .type = QEMU_OPT_STRING, |
| 38 | }, { |
| 39 | .name = "sock_fd", |
| 40 | .type = QEMU_OPT_NUMBER, |
Tobias Schramm | b96feb2 | 2017-06-29 15:11:50 +0200 | [diff] [blame] | 41 | }, { |
| 42 | .name = "fmode", |
| 43 | .type = QEMU_OPT_NUMBER, |
| 44 | }, { |
| 45 | .name = "dmode", |
| 46 | .type = QEMU_OPT_NUMBER, |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 47 | }, |
Pradeep Jagadeesh | a2a7862 | 2017-02-28 10:31:46 +0100 | [diff] [blame] | 48 | |
| 49 | THROTTLE_OPTS, |
| 50 | |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 51 | { /*End of list */ } |
| 52 | }, |
| 53 | }; |
| 54 | |
| 55 | static 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 Schramm | b96feb2 | 2017-06-29 15:11:50 +0200 | [diff] [blame] | 84 | }, { |
| 85 | .name = "fmode", |
| 86 | .type = QEMU_OPT_NUMBER, |
| 87 | }, { |
| 88 | .name = "dmode", |
| 89 | .type = QEMU_OPT_NUMBER, |
Paolo Bonzini | 4d45457 | 2012-11-26 16:03:42 +0100 | [diff] [blame] | 90 | }, |
| 91 | |
| 92 | { /*End of list */ } |
| 93 | }, |
| 94 | }; |
| 95 | |
| 96 | static void fsdev_register_config(void) |
| 97 | { |
| 98 | qemu_add_opts(&qemu_fsdev_opts); |
| 99 | qemu_add_opts(&qemu_virtfs_opts); |
| 100 | } |
Eduardo Habkost | 34294e2 | 2016-02-16 18:59:07 -0200 | [diff] [blame] | 101 | opts_init(fsdev_register_config); |