Start 1.33.0 development cycle
[oweals/busybox.git] / libbb / full_write.c
index a2abaee25a0580221c8896e7c062539370bb6e49..15766fc6cf2fee4aef1c7b73a7b687b45b9c2d36 100644 (file)
@@ -6,13 +6,13 @@
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
-
 #include "libbb.h"
 
 /*
  * Write all of the supplied buffer out to a file.
  * This does multiple writes as necessary.
- * Returns the amount written, or -1 on an error.
+ * Returns the amount written, or -1 if error was seen
+ * on the very first write.
  */
 ssize_t FAST_FUNC full_write(int fd, const void *buf, size_t len)
 {
@@ -30,7 +30,7 @@ ssize_t FAST_FUNC full_write(int fd, const void *buf, size_t len)
                                /* user can do another write to know the error code */
                                return total;
                        }
-                       return cc;      /* write() returns -1 on failure. */
+                       return cc;  /* write() returns -1 on failure. */
                }
 
                total += cc;