qemu-fsdev-opts.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Virtio 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. #include "qemu/osdep.h"
  8. #include "qemu/config-file.h"
  9. #include "qemu/option.h"
  10. #include "qemu/module.h"
  11. static QemuOptsList qemu_fsdev_opts = {
  12. .name = "fsdev",
  13. .implied_opt_name = "fsdriver",
  14. .head = QTAILQ_HEAD_INITIALIZER(qemu_fsdev_opts.head),
  15. .desc = {
  16. {
  17. .name = "fsdriver",
  18. .type = QEMU_OPT_STRING,
  19. }, {
  20. .name = "path",
  21. .type = QEMU_OPT_STRING,
  22. }, {
  23. .name = "security_model",
  24. .type = QEMU_OPT_STRING,
  25. }, {
  26. .name = "writeout",
  27. .type = QEMU_OPT_STRING,
  28. }, {
  29. .name = "readonly",
  30. .type = QEMU_OPT_BOOL,
  31. }, {
  32. .name = "socket",
  33. .type = QEMU_OPT_STRING,
  34. }, {
  35. .name = "sock_fd",
  36. .type = QEMU_OPT_NUMBER,
  37. },
  38. { /*End of list */ }
  39. },
  40. };
  41. static QemuOptsList qemu_virtfs_opts = {
  42. .name = "virtfs",
  43. .implied_opt_name = "fsdriver",
  44. .head = QTAILQ_HEAD_INITIALIZER(qemu_virtfs_opts.head),
  45. .desc = {
  46. {
  47. .name = "fsdriver",
  48. .type = QEMU_OPT_STRING,
  49. }, {
  50. .name = "path",
  51. .type = QEMU_OPT_STRING,
  52. }, {
  53. .name = "mount_tag",
  54. .type = QEMU_OPT_STRING,
  55. }, {
  56. .name = "security_model",
  57. .type = QEMU_OPT_STRING,
  58. }, {
  59. .name = "writeout",
  60. .type = QEMU_OPT_STRING,
  61. }, {
  62. .name = "readonly",
  63. .type = QEMU_OPT_BOOL,
  64. }, {
  65. .name = "socket",
  66. .type = QEMU_OPT_STRING,
  67. }, {
  68. .name = "sock_fd",
  69. .type = QEMU_OPT_NUMBER,
  70. },
  71. { /*End of list */ }
  72. },
  73. };
  74. static void fsdev_register_config(void)
  75. {
  76. qemu_add_opts(&qemu_fsdev_opts);
  77. qemu_add_opts(&qemu_virtfs_opts);
  78. }
  79. machine_init(fsdev_register_config);