dev9p.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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_9p.h"
  21. #include "virtio_pci.h"
  22. #include "virtio_lib.h"
  23. Dev v9pdevtab = {
  24. .dc = '9',
  25. .name = "9p",
  26. .reset = devreset,
  27. // .init = v9pinit,
  28. .shutdown = devshutdown,
  29. // .attach = v9pattach,
  30. // .walk = v9pwalk,
  31. // .stat = v9pstat,
  32. // .open = v9popen,
  33. .create = devcreate,
  34. // .close = v9pclose,
  35. // .read = v9pread,
  36. .bread = devbread,
  37. // .write = v9pwrite,
  38. .bwrite = devbwrite,
  39. .remove = devremove,
  40. .wstat = devwstat,
  41. };