aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2000-09-13 23:08:07 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2000-09-13 23:08:07 +0000
commit56a328810b86bdc9014923a8fb0874be98795aef (patch)
treea1602392eac4e9612d29f07cd46335e363835f8e /coreutils
parentb4c3c59a453f0902f2a7c6d9e5ae5e497c9f3a87 (diff)
downloadbusybox-56a328810b86bdc9014923a8fb0874be98795aef.tar.gz
Fix looping bug, use fullRead
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/dd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 5ab0a90af..697cb7e58 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -140,9 +140,9 @@ extern int dd_main(int argc, char **argv)
while ((readSize = totalSize - inTotal) > 0) {
if (readSize > BUFSIZ)
readSize=BUFSIZ;
- inCc = read(inFd, buf, readSize);
+ inCc = fullRead(inFd, buf, readSize);
inTotal += inCc;
- if ((outCc = fullWrite(outFd, buf, inCc)) < 0)
+ if ((outCc = fullWrite(outFd, buf, inCc)) < 1)
break;
outTotal += outCc;
}