summaryrefslogtreecommitdiff
path: root/bin/cp/cp.c
diff options
context:
space:
mode:
authorsvn2git <svn2git@FreeBSD.org>1994-07-01 08:00:00 +0000
committersvn2git <svn2git@FreeBSD.org>1994-07-01 08:00:00 +0000
commit5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch)
treee779b5a6edddbb949b7990751b12d6f25304ba86 /bin/cp/cp.c
parenta16f65c7d117419bd266c28a1901ef129a337569 (diff)
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r--bin/cp/cp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index e21bba631e9d..97375b17d1a1 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -299,7 +299,7 @@ copy_file(fs, dne)
struct stat *fs;
int dne;
{
- static char buf[MAXBSIZE];
+ static char buf[MAXBSIZE * 4];
register int from_fd, to_fd, rcount, wcount;
struct stat to_stat;
char *p;
@@ -358,7 +358,7 @@ copy_file(fs, dne)
if (munmap((caddr_t) p, fs->st_size) < 0)
err("%s: %s", from.p_path, strerror(errno));
} else {
- while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) {
+ while ((rcount = read(from_fd, buf, sizeof(buf))) > 0) {
wcount = write(to_fd, buf, rcount);
if (rcount != wcount || wcount == -1) {
err("%s: %s", to.p_path, strerror(errno));