summaryrefslogtreecommitdiff
path: root/rsync.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2022-02-16 16:35:35 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2022-02-16 16:35:35 +0900
commitf06790ac116291bcef7fd6c9057b17306fc8f74b (patch)
tree5830eb26cd754cba21f0117f078eafb553851123 /rsync.c
parent6128f56694623bf0ea09f4fc22f9a94996335e65 (diff)
downloadrsync-f06790ac116291bcef7fd6c9057b17306fc8f74b.tar.gz
rsync-f06790ac116291bcef7fd6c9057b17306fc8f74b.tar.bz2
rsync-f06790ac116291bcef7fd6c9057b17306fc8f74b.zip
Imported Upstream version 3.1.2upstream/3.1.2
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/rsync.c b/rsync.c
index c498c44f..f1404ce1 100644
--- a/rsync.c
+++ b/rsync.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1996 Andrew Tridgell
* Copyright (C) 1996 Paul Mackerras
- * Copyright (C) 2003-2014 Wayne Davison
+ * Copyright (C) 2003-2015 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -364,7 +364,7 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
}
/* Send all the data we read for this flist to the generator. */
start_flist_forward(ndx);
- flist = recv_file_list(f_in);
+ flist = recv_file_list(f_in, ndx);
flist->parent_ndx = ndx;
stop_flist_forward();
}
@@ -548,7 +548,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
|| (!(preserve_times & PRESERVE_LINK_TIMES) && S_ISLNK(sxp->st.st_mode)))
flags |= ATTRS_SKIP_MTIME;
if (!(flags & ATTRS_SKIP_MTIME)
- && cmp_time(sxp->st.st_mtime, file->modtime) != 0) {
+ && (sxp->st.st_mtime != file->modtime
+#ifdef ST_MTIME_NSEC
+ || (NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file))
+#endif
+ )) {
int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode);
if (ret < 0) {
rsyserr(FERROR_XFER, errno, "failed to set times on %s",
@@ -601,7 +605,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
}
/* This is only called for SIGINT, SIGHUP, and SIGTERM. */
-RETSIGTYPE sig_int(int sig_num)
+void sig_int(int sig_num)
{
/* KLUGE: if the user hits Ctrl-C while ssh is prompting
* for a password, then our cleanup's sending of a SIGUSR1