qemu-fsdev.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Virtio 9p
  3. *
  4. * Copyright IBM, Corp. 2010
  5. *
  6. * Authors:
  7. * Gautham R Shenoy <ego@in.ibm.com>
  8. *
  9. * This work is licensed under the terms of the GNU GPL, version 2. See
  10. * the COPYING file in the top-level directory.
  11. *
  12. */
  13. #ifndef QEMU_FSDEV_H
  14. #define QEMU_FSDEV_H
  15. #include "qemu-option.h"
  16. #include "file-op-9p.h"
  17. /*
  18. * A table to store the various file systems and their callback operations.
  19. * -----------------
  20. * fstype | ops
  21. * -----------------
  22. * local | local_ops
  23. * . |
  24. * . |
  25. * . |
  26. * . |
  27. * -----------------
  28. * etc
  29. */
  30. typedef struct FsTypeTable {
  31. const char *name;
  32. FileOperations *ops;
  33. } FsTypeTable;
  34. /*
  35. * Structure to store the various fsdev's passed through command line.
  36. */
  37. typedef struct FsTypeEntry {
  38. char *fsdev_id;
  39. char *path;
  40. char *security_model;
  41. int export_flags;
  42. FileOperations *ops;
  43. } FsTypeEntry;
  44. typedef struct FsTypeListEntry {
  45. FsTypeEntry fse;
  46. QTAILQ_ENTRY(FsTypeListEntry) next;
  47. } FsTypeListEntry;
  48. int qemu_fsdev_add(QemuOpts *opts);
  49. FsTypeEntry *get_fsdev_fsentry(char *id);
  50. extern FileOperations local_ops;
  51. extern FileOperations handle_ops;
  52. #endif