*
* \return The return value of the underlying call to \ref xwritev().
*/
-int xwrite(int fd, const char *buf, size_t len)
+int xwrite(int fd, const void *buf, size_t len)
{
struct iovec iov = {.iov_base = (void *)buf, .iov_len = len};
return xwritev(fd, &iov, 1);
*
* \return Number of bytes written on success, negative error code else.
*/
-int write_all(int fd, const char *buf, size_t len)
+int write_all(int fd, const void *buf, size_t len)
{
int ret = xwrite(fd, buf, len);
/** \file fd.h exported symbols from fd.c */
int xrename(const char *oldpath, const char *newpath);
-int write_all(int fd, const char *buf, size_t len);
+int write_all(int fd, const void *buf, size_t len);
__printf_2_3 int write_va_buffer(int fd, const char *fmt, ...);
int xpoll(struct pollfd *fds, nfds_t nfds, int timeout);
__must_check int mark_fd_nonblocking(int fd);
int readv_nonblock(int fd, struct iovec *iov, int iovcnt, size_t *num_bytes);
int read_nonblock(int fd, void *buf, size_t sz, size_t *num_bytes);
int read_and_compare(int fd, const char *expectation);
-int xwrite(int fd, const char *buf, size_t len);
+int xwrite(int fd, const void *buf, size_t len);
int xwritev(int fd, struct iovec *iov, int iovcnt);
/**