From 875ce094cf2d421ba05bed6cfd6c948084d52abe Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 14 May 2019 17:46:18 +0200 Subject: dd: fix handling of short result of full_write(), closes 11711 $ dd bs=1G --- libbb/full_write.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/full_write.c b/libbb/full_write.c index 2b7983f4c..15766fc6c 100644 --- a/libbb/full_write.c +++ b/libbb/full_write.c @@ -11,7 +11,8 @@ /* * 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) { -- cgit v1.2.3