You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
847 B

5 years ago
  1. #include "fuse_dev.h"
  2. #include <stdlib.h>
  3. #include <sys/uio.h>
  4. #include <unistd.h>
  5. fuse_dev_t*
  6. fuse_dev_alloc(void)
  7. {
  8. return calloc(1,sizeof(fuse_dev_t));
  9. }
  10. void
  11. fuse_dev_free(fuse_dev_t *fd_)
  12. {
  13. if(fd_)
  14. free(fd_);
  15. }
  16. fuse_dev_t*
  17. fuse_dev_clone(fuse_dev_t *fd_)
  18. {
  19. return fd_;
  20. }
  21. int64_t
  22. fuse_dev_read(const fuse_dev_t *fd_,
  23. void *buf_,
  24. uint64_t count_)
  25. {
  26. int64_t rv;
  27. rv = read(fd_->fd,buf_,count_);
  28. return rv;
  29. }
  30. int64_t
  31. fuse_dev_write(const fuse_dev_t *fd_,
  32. const struct iovec *iov_,
  33. int iovcnt_)
  34. {
  35. int64_t rv;
  36. rv = writev(fd_->fd,iov_,iovcnt_);
  37. return rv;
  38. }
  39. int64_t
  40. fuse_dev_write_splice(const fuse_dev_t* fd_,
  41. const struct iovec *iov_,
  42. int iovcnt_)
  43. {
  44. }