dev9p.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * This file is part of the Harvey operating system. It is subject to the
  3. * license terms of the GNU GPL v2 in LICENSE.gpl found in the top-level
  4. * directory of this distribution and at http://www.gnu.org/licenses/gpl-2.0.txt
  5. *
  6. * No part of Harvey operating system, including this file, may be copied,
  7. * modified, propagated, or distributed except according to the terms
  8. * contained in the LICENSE.gpl file.
  9. */
  10. // dev9p.c ('#9'): a virtio9p protocol translation driver to use QEMU's built-in 9p.
  11. #include "u.h"
  12. #include "../port/lib.h"
  13. #include "mem.h"
  14. #include "dat.h"
  15. #include "fns.h"
  16. #include "io.h"
  17. #include "../port/error.h"
  18. #include "virtio_ring.h"
  19. #include "virtio_config.h"
  20. #include "virtio_pci.h"
  21. #include "virtio_lib.h"
  22. Dev v9pdevtab = {
  23. .dc = '9',
  24. .name = "9p",
  25. .reset = devreset,
  26. .init = v9pinit,
  27. .shutdown = devshutdown,
  28. .attach = v9pattach,
  29. .walk = v9pwalk,
  30. .stat = v9pstat,
  31. .open = v9popen,
  32. .create = devcreate,
  33. .close = v9pclose,
  34. .read = v9pread,
  35. .bread = devbread,
  36. .write = v9pwrite,
  37. .bwrite = devbwrite,
  38. .remove = devremove,
  39. .wstat = devwstat,
  40. };