aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/dd.c4
-rw-r--r--dd.c4
2 files changed, 4 insertions, 4 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;
}
diff --git a/dd.c b/dd.c
index 5ab0a90af..697cb7e58 100644
--- a/dd.c
+++ b/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;
}