else
in_del_hier = 0;
}
-@@ -851,12 +874,14 @@ struct file_struct *make_file(char *fnam
+@@ -853,12 +876,14 @@ struct file_struct *make_file(char *fnam
memset(bp, 0, file_struct_len);
bp += file_struct_len;
#ifdef SUPPORT_HARD_LINKS
if (flist && flist->hlink_pool) {
-@@ -969,7 +994,7 @@ static void send_if_directory(int f, str
+@@ -971,7 +996,7 @@ static void send_if_directory(int f, str
char is_dot_dir = fbuf[ol-1] == '.' && (ol == 1 || fbuf[ol-2] == '/');
if (S_ISDIR(file->mode)
void *save_filters;
unsigned int len = strlen(fbuf);
if (len > 1 && fbuf[len-1] == '/')
-@@ -1581,8 +1606,9 @@ static void clean_flist(struct file_list
+@@ -1583,8 +1608,9 @@ static void clean_flist(struct file_list
}
/* Make sure we don't lose track of a user-specified
* top directory. */
clear_file(flist->files[drop], flist);
-@@ -1706,7 +1732,7 @@ static void output_flist(struct file_lis
+@@ -1708,7 +1734,7 @@ static void output_flist(struct file_lis
file->dirname ? file->dirname : "",
file->dirname ? "/" : "", NS(file->basename),
S_ISDIR(file->mode) ? "/" : "", (int)file->mode,
--- old/generator.c
+++ new/generator.c
-@@ -44,6 +44,7 @@ extern int preserve_perms;
+@@ -43,6 +43,7 @@ extern int preserve_perms;
extern int preserve_uid;
extern int preserve_gid;
extern int preserve_times;
extern int omit_dir_times;
extern int delete_mode;
extern int delete_before;
-@@ -90,6 +91,7 @@ extern dev_t filesystem_dev;
+@@ -89,6 +90,7 @@ extern dev_t filesystem_dev;
extern char *backup_dir;
extern char *backup_suffix;
extern int backup_suffix_len;
extern struct file_list *the_file_list;
extern struct filter_list_struct server_filter_list;
-@@ -182,7 +184,7 @@ static int delete_item(char *fname, int
+@@ -181,7 +183,7 @@ static int delete_item(char *fname, int
for (j = dirlist->count; j--; ) {
struct file_struct *fp = dirlist->files[j];
continue;
strlcpy(p, fp->basename, remainder);
-@@ -260,7 +262,7 @@ static void delete_in_dir(struct file_li
+@@ -259,7 +261,7 @@ static void delete_in_dir(struct file_li
filt_array[cur_depth] = push_local_filters(fbuf, dlen);
if (one_file_system) {
filesystem_dev = stp->st_dev;
else if (filesystem_dev != stp->st_dev)
return;
-@@ -272,7 +274,7 @@ static void delete_in_dir(struct file_li
+@@ -271,7 +273,7 @@ static void delete_in_dir(struct file_li
* from the filesystem. */
for (i = dirlist->count; i--; ) {
struct file_struct *fp = dirlist->files[i];
continue;
if (flist_find(flist, fp) < 0) {
f_name(fp, delbuf);
-@@ -298,11 +300,11 @@ static void do_delete_pass(struct file_l
+@@ -297,11 +299,11 @@ static void do_delete_pass(struct file_l
for (j = 0; j < flist->count; j++) {
struct file_struct *file = flist->files[j];
rprintf(FINFO, "deleting in %s\n", fbuf);
if (link_stat(fbuf, &st, keep_dirlinks) < 0
-@@ -346,6 +348,9 @@ void itemize(struct file_struct *file, i
+@@ -345,6 +347,9 @@ void itemize(struct file_struct *file, i
&& (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
|| (keep_time && cmp_time(file->modtime, st->st_mtime) != 0))
iflags |= ITEM_REPORT_TIME;
if ((file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS))
iflags |= ITEM_REPORT_PERMS;
if (preserve_uid && am_root && file->uid != st->st_uid)
-@@ -547,7 +552,7 @@ static int find_fuzzy(struct file_struct
+@@ -548,7 +553,7 @@ static int find_fuzzy(struct file_struct
uint32 dist;
if (!S_ISREG(fp->mode) || !fp->length
continue;
name = fp->basename;
-@@ -663,6 +668,8 @@ static int try_dests_reg(struct file_str
+@@ -664,6 +669,8 @@ static int try_dests_reg(struct file_str
itemizing && verbose > 1,
code) < 0)
goto try_a_copy;
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
} else
-@@ -929,7 +936,7 @@ static void recv_generator(char *fname,
+@@ -941,7 +948,7 @@ static void recv_generator(char *fname,
&& verbose && code && f_out != -1)
rprintf(code, "%s/\n", fname);
if (delete_during && f_out != -1 && !phase && dry_run < 2
delete_in_dir(the_file_list, fname, file, &st);
return;
}
-@@ -1218,7 +1225,7 @@ static void recv_generator(char *fname,
+@@ -1244,7 +1251,7 @@ static void recv_generator(char *fname,
if (fuzzy_dirlist) {
int j = flist_find(fuzzy_dirlist, file);
if (j >= 0) /* don't use changing file as future fuzzy basis */
/* open the file */
--- old/hlink.c
+++ new/hlink.c
-@@ -28,6 +28,7 @@ extern int link_dest;
- extern int make_backups;
+@@ -30,6 +30,7 @@ extern int make_backups;
+ extern int remove_source_files;
extern int stdout_format_has_i;
extern char *basis_dir[];
+extern unsigned int file_struct_len;
extern struct file_list *the_file_list;
#ifdef SUPPORT_HARD_LINKS
-@@ -88,10 +89,10 @@ static void link_idev_data(void)
+@@ -90,10 +91,10 @@ static void link_idev_data(void)
FPTR(cur)->link_u.links = pool_talloc(hlink_pool,
struct hlink, 1, "hlink_list");
hlink_list[to++] = head;
} else
FPTR(cur)->link_u.links = NULL;
-@@ -177,7 +178,7 @@ int hard_link_check(struct file_struct *
+@@ -179,7 +180,7 @@ int hard_link_check(struct file_struct *
{
#ifdef SUPPORT_HARD_LINKS
int head;
head = hlink_list[file->F_HLINDEX] = file->F_NEXT;
else
head = hlink_list[file->F_HLINDEX];
-@@ -272,8 +273,8 @@ void hard_link_cluster(struct file_struc
+@@ -279,8 +280,8 @@ void hard_link_cluster(struct file_struc
file->F_HLINDEX = FINISHED_LINK;
if (link_stat(f_name(file, hlink1), &st1, 0) < 0)
return;
ndx = file->F_NEXT;
file = FPTR(ndx);
}
-@@ -288,6 +289,6 @@ void hard_link_cluster(struct file_struc
- maybe_hard_link(file, ndx, hlink2, statret, &st2,
- hlink1, &st1, itemizing, code);
+@@ -300,6 +301,6 @@ void hard_link_cluster(struct file_struc
+ send_msg(MSG_SUCCESS, numbuf, 4);
+ }
file->F_HLINDEX = FINISHED_LINK;
- } while (!(file->flags & FLAG_HLINK_EOL));
+ } while (!(FFLAGS(file) & FLAG_HLINK_EOL));
+extern int preserve_atimes;
extern int stdout_format_has_i;
extern int stdout_format_has_o_or_i;
- extern int logfile_format_has_o_or_i;
-@@ -594,7 +595,8 @@ static void log_formatted(enum logcode c
+ extern int logfile_format_has_i;
+@@ -609,7 +610,8 @@ static void log_formatted(enum logcode c
n[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
n[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
n[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -305,8 +306,9 @@ void usage(enum logcode F)
+@@ -309,8 +310,9 @@ void usage(enum logcode F)
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," --super receiver attempts super-user activities\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
-@@ -419,6 +421,9 @@ static struct poptOption long_options[]
+@@ -424,6 +426,9 @@ static struct poptOption long_options[]
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
else if (preserve_executability && am_sender)
--- old/rsync.c
+++ new/rsync.c
-@@ -35,6 +35,7 @@ extern int dry_run;
- extern int logfile_format_has_i;
+@@ -34,6 +34,7 @@ extern int verbose;
+ extern int dry_run;
extern int preserve_perms;
extern int preserve_executability;
+extern int preserve_atimes;
extern int preserve_times;
extern int omit_dir_times;
extern int am_root;
-@@ -128,6 +129,7 @@ int set_file_attrs(char *fname, struct f
+@@ -127,6 +128,7 @@ int set_file_attrs(char *fname, struct f
int updated = 0;
STRUCT_STAT st2;
int change_uid, change_gid;
if (!st) {
if (dry_run)
-@@ -146,18 +148,33 @@ int set_file_attrs(char *fname, struct f
+@@ -145,18 +147,33 @@ int set_file_attrs(char *fname, struct f
}
}
/* These flags are used in the live flist data. */
-@@ -119,6 +120,7 @@
+@@ -120,6 +121,7 @@
#define ATTRS_REPORT (1<<0)
#define ATTRS_SKIP_MTIME (1<<1)
--super receiver attempts super-user activities
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-@@ -861,6 +862,12 @@ it is preserving modification times (see
+@@ -862,6 +863,12 @@ it is preserving modification times (see
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
extern struct stats stats;
extern struct file_list *the_file_list;
extern char *stdout_format;
-@@ -129,7 +130,7 @@ void successful_send(int ndx)
-
- file = the_file_list->files[ndx];
- /* The generator might tell us about symlinks we didn't send. */
-- if (!(file->flags & FLAG_SENT) && !S_ISLNK(file->mode))
-+ if (!(FFLAGS(file) & FLAG_SENT) && !S_ISLNK(file->mode))
- return;
- if (file->dir.root) {
- offset = stringjoin(fname, sizeof fname,
-@@ -371,7 +372,7 @@ void send_files(struct file_list *flist,
+@@ -368,7 +369,7 @@ void send_files(struct file_list *flist,
rprintf(FINFO, "sender finished %s\n", fname);
/* Flag that we actually sent this entry. */