qemu-fsdev.h 1.2 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 FsDriverTable {
  31. const char *name;
  32. FileOperations *ops;
  33. } FsDriverTable;
  34. /*
  35. * Structure to store the various fsdev's passed through command line.
  36. */
  37. typedef struct FsDriverEntry {
  38. char *fsdev_id;
  39. char *path;
  40. int export_flags;
  41. FileOperations *ops;
  42. } FsDriverEntry;
  43. typedef struct FsDriverListEntry {
  44. FsDriverEntry fse;
  45. QTAILQ_ENTRY(FsDriverListEntry) next;
  46. } FsDriverListEntry;
  47. int qemu_fsdev_add(QemuOpts *opts);
  48. FsDriverEntry *get_fsdev_fsentry(char *id);
  49. extern FileOperations local_ops;
  50. extern FileOperations handle_ops;
  51. extern FileOperations synth_ops;
  52. #endif