dd: fix handling of short result of full_write(), closes 11711
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 14 May 2019 15:46:18 +0000 (17:46 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 14 May 2019 15:49:14 +0000 (17:49 +0200)
commit875ce094cf2d421ba05bed6cfd6c948084d52abe
tree90bff2304d2bb604d170a16715e924b2a6947597
parent8c317f03f6d4d89fd7b0cc1e6eaf515040b8e701
dd: fix handling of short result of full_write(), closes 11711

$ dd bs=1G <sda1 of=/dev/sda1
dd: error writing '/dev/sda1': No space left on device
1+0 records in
0+0 records out
999292928 bytes (953.0MB) copied, 0.784617 seconds, 1.2GB/s

function                                             old     new   delta
write_and_stats                                       99     102      +3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/dd.c
libbb/full_write.c