diff options
Diffstat (limited to 'lib9p/include')
-rw-r--r-- | lib9p/include/lib9p/9p.generated.h | 46 | ||||
-rw-r--r-- | lib9p/include/lib9p/srv.h | 5 |
2 files changed, 28 insertions, 23 deletions
diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h index 7a50537..e28b1d3 100644 --- a/lib9p/include/lib9p/9p.generated.h +++ b/lib9p/include/lib9p/9p.generated.h @@ -8,6 +8,11 @@ #include <libhw/generic/net.h> /* for struct iovec */ +struct _lib9p_iovec_list { + struct iovec *iov; + int iovcnt; +}; + /* config *********************************************************************/ #include "config.h" @@ -156,6 +161,7 @@ enum lib9p_msg_type { /* uint8_t */ /* payload types **************************************************************/ + #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u /* size = 2 ; max_iov = 1 ; max_copy = 2 */ typedef uint16_t lib9p_tag_t; @@ -549,9 +555,9 @@ struct lib9p_msg_Rflush { /* min_size = 11 ; exp_size = 8,203 ; max_size = 2,147,483,658 ; max_iov = 2 ; max_copy = 11 */ struct lib9p_msg_Rread { - lib9p_tag_t tag; - uint32_t count; - [[gnu::nonstring]] char *data; + lib9p_tag_t tag; + uint32_t count; + struct _lib9p_iovec data; }; /* size = 11 ; max_iov = 1 ; max_copy = 11 */ @@ -602,9 +608,9 @@ struct lib9p_msg_Rxattrcreate { /* min_size = 11 ; exp_size = 8,203 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) ; max_iov = 2 ; max_copy = 11 */ struct lib9p_msg_Rreaddir { - lib9p_tag_t tag; - uint32_t count; - [[gnu::nonstring]] char *data; + lib9p_tag_t tag; + uint32_t count; + struct _lib9p_iovec data; }; /* size = 7 ; max_iov = 1 ; max_copy = 7 */ @@ -642,9 +648,9 @@ struct lib9p_msg_Rsession { /* min_size = 11 ; exp_size = 8,203 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) ; max_iov = 2 ; max_copy = 11 */ struct lib9p_msg_Rsread { - lib9p_tag_t tag; - uint32_t count; - [[gnu::nonstring]] char *data; + lib9p_tag_t tag; + uint32_t count; + struct _lib9p_iovec data; }; /* size = 11 ; max_iov = 1 ; max_copy = 11 */ @@ -665,11 +671,11 @@ struct lib9p_msg_Tread { /* min_size = 23 ; exp_size = 8,215 ; max_size = 2,147,483,670 ; max_iov = 2 ; max_copy = 23 */ struct lib9p_msg_Twrite { - lib9p_tag_t tag; - lib9p_fid_t fid; - uint64_t offset; - uint32_t count; - [[gnu::nonstring]] char *data; + lib9p_tag_t tag; + lib9p_fid_t fid; + uint64_t offset; + uint32_t count; + struct _lib9p_iovec data; }; /* size = 11 ; max_iov = 1 ; max_copy = 11 */ @@ -809,12 +815,12 @@ struct lib9p_msg_Tsread { /* min_size = 17 ; exp_size = 8,673 ; max_size = 8,589,934,607 (warning: >UINT32_MAX) ; max_iov = 2 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2) ; max_copy = 17 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2) */ struct lib9p_msg_Tswrite { - lib9p_tag_t tag; - uint32_t fid; - uint16_t nwname; - struct lib9p_s *wname; - uint32_t count; - [[gnu::nonstring]] char *data; + lib9p_tag_t tag; + uint32_t fid; + uint16_t nwname; + struct lib9p_s *wname; + uint32_t count; + struct _lib9p_iovec data; }; #endif /* CONFIG_9P_ENABLE_9P2000_e */ diff --git a/lib9p/include/lib9p/srv.h b/lib9p/include/lib9p/srv.h index ff5ebdc..ad209b8 100644 --- a/lib9p/include/lib9p/srv.h +++ b/lib9p/include/lib9p/srv.h @@ -43,8 +43,6 @@ lo_interface lib9p_srv_dio; /* FIXME: I don't like that the pointers returned by stat() and * pread() have to remain live after they return. Perhaps a * `respond()`-callback? But that just reads as gross in C. - * - * FIXME: It would be nice if pread() could return more than 1 iovec. */ #define lib9p_srv_file_LO_IFACE \ /* resource management **********************************************/ \ @@ -99,7 +97,8 @@ LO_INTERFACE(lib9p_srv_file); LO_FUNC(void , pread , struct lib9p_srv_ctx *, \ uint32_t byte_count, \ uint64_t byte_offset, \ - struct iovec *ret) \ + struct iovec *ret_iov, \ + int *ret_iovcnt) \ LO_FUNC(uint32_t , pwrite , struct lib9p_srv_ctx *, \ void *buf, \ uint32_t byte_count, \ |