Commit efa95a18 authored by Wayne Davison's avatar Wayne Davison

Call map_file() with its new block_size arg.

parent 51bd4f0f
...@@ -99,9 +99,10 @@ void file_checksum(char *fname,char *sum,OFF_T size) ...@@ -99,9 +99,10 @@ void file_checksum(char *fname,char *sum,OFF_T size)
memset(sum,0,MD4_SUM_LENGTH); memset(sum,0,MD4_SUM_LENGTH);
fd = do_open(fname, O_RDONLY, 0); fd = do_open(fname, O_RDONLY, 0);
if (fd == -1) return; if (fd == -1)
return;
buf = map_file(fd,size); buf = map_file(fd, size, CSUM_CHUNK);
mdfour_begin(&m); mdfour_begin(&m);
......
...@@ -175,8 +175,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) ...@@ -175,8 +175,7 @@ void send_files(struct file_list *flist, int f_out, int f_in)
initial_stats = stats; initial_stats = stats;
s = receive_sums(f_in); if (!(s = receive_sums(f_in))) {
if (!s) {
io_error |= IOERR_GENERAL; io_error |= IOERR_GENERAL;
rprintf(FERROR, "receive_sums failed\n"); rprintf(FERROR, "receive_sums failed\n");
return; return;
...@@ -210,7 +209,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) ...@@ -210,7 +209,7 @@ void send_files(struct file_list *flist, int f_out, int f_in)
return; return;
} }
mbuf = st.st_size ? map_file(fd, st.st_size) : NULL; mbuf = st.st_size ? map_file(fd, st.st_size, s->blength) : NULL;
if (verbose > 2) { if (verbose > 2) {
rprintf(FINFO, "send_files mapped %s of size %.0f\n", rprintf(FINFO, "send_files mapped %s of size %.0f\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment