Rename write_nonblock() to xwrite().
[paraslash.git] / fd.c
diff --git a/fd.c b/fd.c
index 01c7ed8e83552734b1077d444fc055f89f7695c9..a73325ba5af60adb712213aa789243dc02f74d90 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -37,7 +37,7 @@
  * len indicates that some bytes have been written but the next write would
  * block.
  */
-int write_nonblock(int fd, const char *buf, size_t len)
+int xwrite(int fd, const char *buf, size_t len)
 {
        size_t written = 0;
 
@@ -73,14 +73,14 @@ int write_nonblock(int fd, const char *buf, size_t len)
  * \param buf The buffer to be sent.
  * \param len The length of \a buf.
  *
- * This is like \ref write_nonblock() but returns \p -E_SHORT_WRITE if not
+ * This is like \ref xwrite() but returns \p -E_SHORT_WRITE if not
  * all data could be written.
  *
  * \return Number of bytes written on success, negative error code else.
  */
 int write_all(int fd, const char *buf, size_t len)
 {
-       int ret = write_nonblock(fd, buf, len);
+       int ret = xwrite(fd, buf, len);
 
        if (ret < 0)
                return ret;
@@ -120,7 +120,7 @@ __printf_2_3 int write_va_buffer(int fd, const char *fmt, ...)
  * If \a rfds is not \p NULL and the (non-blocking) file descriptor \a fd is
  * not set in \a rfds, this function returns early without doing anything.
  * Otherwise The function tries to read up to \a sz bytes from \a fd. As for
- * write_nonblock(), EAGAIN is not considered an error condition. However, EOF
+ * xwrite(), EAGAIN is not considered an error condition. However, EOF
  * is.
  *
  * \return Zero or a negative error code. If the underlying call to readv(2)
@@ -133,7 +133,7 @@ __printf_2_3 int write_va_buffer(int fd, const char *fmt, ...)
  * have been read before the error occurred. In this case \a num_bytes is
  * positive.
  *
- * \sa \ref write_nonblock(), read(2), readv(2).
+ * \sa \ref xwrite(), read(2), readv(2).
  */
 int readv_nonblock(int fd, struct iovec *iov, int iovcnt, fd_set *rfds,
                size_t *num_bytes)