From 80c890752499bc879077ad1653f3efb1884d61b9 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 5 May 2007 18:59:20 +0000 Subject: [PATCH] Fixed failing hunks. --- flags.diff | 26 +++++++++++++------------- fsync.diff | 20 ++++++++++---------- preallocate.diff | 10 +++++----- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/flags.diff b/flags.diff index 642d483..80b2d0d 100644 --- a/flags.diff +++ b/flags.diff @@ -27,9 +27,9 @@ TODO: fix --delete-delay to work with --flags option. memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \ strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \ setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \ -- strerror putenv iconv_open locale_charset nl_langinfo \ -+ chflags strerror putenv iconv_open locale_charset nl_langinfo \ - sigaction sigprocmask) +- strerror putenv iconv_open locale_charset nl_langinfo getxattr \ ++ chflags strerror putenv iconv_open locale_charset nl_langinfo getxattr \ + extattr_get_link sigaction sigprocmask) AC_CHECK_FUNCS(getpgrp tcgetpgrp) --- old/flist.c @@ -42,7 +42,7 @@ TODO: fix --delete-delay to work with --flags option. extern int preserve_uid; extern int preserve_gid; extern int relative_paths; -@@ -340,6 +341,9 @@ static void send_file_entry(int f, struc +@@ -345,6 +346,9 @@ static void send_file_entry(int f, struc { static time_t modtime; static mode_t mode; @@ -52,7 +52,7 @@ TODO: fix --delete-delay to work with --flags option. static int64 dev; static dev_t rdev; static uint32 rdev_major; -@@ -388,6 +392,12 @@ static void send_file_entry(int f, struc +@@ -393,6 +397,12 @@ static void send_file_entry(int f, struc flags |= XMIT_SAME_MODE; else mode = file->mode; @@ -65,7 +65,7 @@ TODO: fix --delete-delay to work with --flags option. if ((preserve_devices && IS_DEVICE(mode)) || (preserve_specials && IS_SPECIAL(mode))) { if (protocol_version < 28) { -@@ -505,6 +515,10 @@ static void send_file_entry(int f, struc +@@ -510,6 +520,10 @@ static void send_file_entry(int f, struc } if (!(flags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); @@ -76,7 +76,7 @@ TODO: fix --delete-delay to work with --flags option. if (preserve_uid && !(flags & XMIT_SAME_UID)) { if (protocol_version < 30) write_int(f, uid); -@@ -593,6 +607,9 @@ static struct file_struct *recv_file_ent +@@ -598,6 +612,9 @@ static struct file_struct *recv_file_ent { static int64 modtime; static mode_t mode; @@ -86,7 +86,7 @@ TODO: fix --delete-delay to work with --flags option. static int64 dev; static dev_t rdev; static uint32 rdev_major; -@@ -725,9 +742,12 @@ static struct file_struct *recv_file_ent +@@ -730,9 +747,12 @@ static struct file_struct *recv_file_ent } if (!(flags & XMIT_SAME_MODE)) mode = from_wire_mode(read_int(f)); @@ -100,7 +100,7 @@ TODO: fix --delete-delay to work with --flags option. if (preserve_uid && !(flags & XMIT_SAME_UID)) { if (protocol_version < 30) -@@ -846,6 +866,10 @@ static struct file_struct *recv_file_ent +@@ -851,6 +871,10 @@ static struct file_struct *recv_file_ent OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32); } file->mode = mode; @@ -111,7 +111,7 @@ TODO: fix --delete-delay to work with --flags option. if (preserve_uid) F_OWNER(file) = uid; if (preserve_gid) -@@ -1159,6 +1183,10 @@ struct file_struct *make_file(const char +@@ -1164,6 +1188,10 @@ struct file_struct *make_file(const char OPT_EXTRA(file, 0)->unum = (uint32)(st.st_size >> 32); } file->mode = st.st_mode; @@ -471,7 +471,7 @@ TODO: fix --delete-delay to work with --flags option. /* These flags are used in the live flist data. */ -@@ -403,6 +404,10 @@ enum msgcode { +@@ -404,6 +405,10 @@ enum msgcode { #endif #endif @@ -482,7 +482,7 @@ TODO: fix --delete-delay to work with --flags option. /* Find a variable that is either exactly 32-bits or longer. * If some code depends on 32-bit truncation, it will need to * take special action in a "#if SIZEOF_INT32 > 4" section. */ -@@ -582,6 +587,7 @@ struct file_struct { +@@ -583,6 +588,7 @@ struct file_struct { extern int file_extra_cnt; extern int preserve_uid; extern int preserve_gid; @@ -490,7 +490,7 @@ TODO: fix --delete-delay to work with --flags option. extern int preserve_acls; extern int preserve_xattrs; -@@ -616,6 +622,7 @@ extern int preserve_xattrs; +@@ -617,6 +623,7 @@ extern int preserve_xattrs; /* When the associated option is on, all entries will have these present: */ #define F_OWNER(f) REQ_EXTRA(f, preserve_uid)->unum #define F_GROUP(f) REQ_EXTRA(f, preserve_gid)->unum diff --git a/fsync.diff b/fsync.diff index f1326f0..a971a93 100644 --- a/fsync.diff +++ b/fsync.diff @@ -17,7 +17,7 @@ To use this patch, run these commands for a successful build: int preserve_links = 0; int preserve_hard_links = 0; int preserve_acls = 0; -@@ -352,6 +353,7 @@ void usage(enum logcode F) +@@ -366,6 +367,7 @@ void usage(enum logcode F) rprintf(F," --partial-dir=DIR put a partially transferred file into DIR\n"); rprintf(F," --delay-updates put all updated files into place at transfer's end\n"); rprintf(F," -m, --prune-empty-dirs prune empty directory chains from the file-list\n"); @@ -25,7 +25,7 @@ To use this patch, run these commands for a successful build: rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n"); rprintf(F," --timeout=TIME set I/O timeout in seconds\n"); rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n"); -@@ -549,6 +551,7 @@ static struct poptOption long_options[] +@@ -567,6 +569,7 @@ static struct poptOption long_options[] {"only-write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 }, {"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 }, {"from0", '0', POPT_ARG_NONE, &eol_nulls, 0, 0, 0}, @@ -33,16 +33,16 @@ To use this patch, run these commands for a successful build: {"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids, 0, 0, 0 }, {"timeout", 0, POPT_ARG_INT, &io_timeout, 0, 0, 0 }, {"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 }, -@@ -1802,6 +1805,9 @@ void server_options(char **args,int *arg - args[ac++] = tmpdir; - } +@@ -1869,6 +1872,9 @@ void server_options(char **args,int *arg + args[ac++] = tmpdir; + } -+ if (do_fsync && am_sender) -+ args[ac++] = "--fsync"; ++ if (do_fsync) ++ args[ac++] = "--fsync"; + - if (basis_dir[0] && am_sender) { - /* the server only needs this option if it is not the sender, - * and it may be an older version that doesn't know this + if (basis_dir[0]) { + /* the server only needs this option if it is not the sender, + * and it may be an older version that doesn't know this --- old/receiver.c +++ new/receiver.c @@ -39,6 +39,7 @@ extern int relative_paths; diff --git a/preallocate.diff b/preallocate.diff index 526e12b..049a430 100644 --- a/preallocate.diff +++ b/preallocate.diff @@ -14,9 +14,9 @@ To use this patch, run these commands for a successful build: @@ -561,7 +561,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \ setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \ - strerror putenv iconv_open locale_charset nl_langinfo \ -- sigaction sigprocmask) -+ sigaction sigprocmask posix_fallocate) + strerror putenv iconv_open locale_charset nl_langinfo getxattr \ +- extattr_get_link sigaction sigprocmask) ++ extattr_get_link sigaction sigprocmask posix_fallocate) AC_CHECK_FUNCS(getpgrp tcgetpgrp) if test $ac_cv_func_getpgrp = yes; then @@ -93,7 +93,7 @@ To use this patch, run these commands for a successful build: if (write_batch && read_batch) { snprintf(err_buf, sizeof err_buf, "--write-batch and --read-batch can not be used together\n"); -@@ -1909,6 +1927,9 @@ void server_options(char **args,int *arg +@@ -1911,6 +1929,9 @@ void server_options(char **args,int *arg else if (remove_source_files) args[ac++] = "--remove-sent-files"; @@ -156,7 +156,7 @@ To use this patch, run these commands for a successful build: if (do_progress) --- old/rsync.h +++ new/rsync.h -@@ -563,6 +563,10 @@ struct idev_node { +@@ -564,6 +564,10 @@ struct idev_node { #define ACLS_NEED_MASK 1 #endif -- 2.34.1