[SCM] The rsync repository. - branch master updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Sat Apr 19 17:48:41 MDT 2014
The branch, master has been updated
via 43d6d0c Change args to file_checksum() to prepare for future changes.
from 22a3ac0 Add new-style compression that skips matching data.
;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 43d6d0c5ba63e3a69717702a1d58ea6a04192bb4
Author: Wayne Davison <wayned at samba.org>
Date: Sat Apr 19 16:26:35 2014 -0700
Change args to file_checksum() to prepare for future changes.
-----------------------------------------------------------------------
Summary of changes:
checksum.c | 6 +++---
flist.c | 2 +-
generator.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/checksum.c b/checksum.c
index 24c2132..a1c2aa2 100644
--- a/checksum.c
+++ b/checksum.c
@@ -98,10 +98,10 @@ void get_checksum2(char *buf, int32 len, char *sum)
}
}
-void file_checksum(char *fname, char *sum, OFF_T size)
+void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
{
struct map_struct *buf;
- OFF_T i, len = size;
+ OFF_T i, len = st_p->st_size;
md_context m;
int32 remainder;
int fd;
@@ -112,7 +112,7 @@ void file_checksum(char *fname, char *sum, OFF_T size)
if (fd == -1)
return;
- buf = map_file(fd, size, MAX_MAP_SIZE, CSUM_CHUNK);
+ buf = map_file(fd, len, MAX_MAP_SIZE, CSUM_CHUNK);
if (protocol_version >= 30) {
md5_begin(&m);
diff --git a/flist.c b/flist.c
index 74c0756..fed0391 100644
--- a/flist.c
+++ b/flist.c
@@ -1306,7 +1306,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
#endif
if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
- file_checksum(thisname, tmp_sum, st.st_size);
+ file_checksum(thisname, &st, tmp_sum);
if (sender_keeps_checksum)
extra_len += SUM_EXTRA_CNT * EXTRA_LEN;
}
diff --git a/generator.c b/generator.c
index 4dcc73a..cd7205e 100644
--- a/generator.c
+++ b/generator.c
@@ -572,7 +572,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
of the file time to determine whether to sync */
if (always_checksum > 0 && S_ISREG(st->st_mode)) {
char sum[MAX_DIGEST_LEN];
- file_checksum(fn, sum, st->st_size);
+ file_checksum(fn, st, sum);
return memcmp(sum, F_SUM(file), checksum_len) == 0;
}
--
The rsync repository.
More information about the rsync-cvs
mailing list