qemu-fsdev.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 "hw/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. FileOperations *ops;
  41. } FsTypeEntry;
  42. typedef struct FsTypeListEntry {
  43. FsTypeEntry fse;
  44. QTAILQ_ENTRY(FsTypeListEntry) next;
  45. } FsTypeListEntry;
  46. extern int qemu_fsdev_add(QemuOpts *opts);
  47. extern FsTypeEntry *get_fsdev_fsentry(char *id);
  48. #endif