Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d7d6347
)
Got rid of two now-unneeded casts.
author
Wayne Davison
<wayned@samba.org>
Thu, 12 Jul 2007 14:54:13 +0000
(14:54 +0000)
committer
Wayne Davison
<wayned@samba.org>
Thu, 12 Jul 2007 14:54:13 +0000
(14:54 +0000)
checksum-updating.diff
patch
|
blob
|
blame
|
history
diff --git
a/checksum-updating.diff
b/checksum-updating.diff
index
b25d101
..
63911a7
100644
(file)
--- a/
checksum-updating.diff
+++ b/
checksum-updating.diff
@@
-11,7
+11,7
@@
To use this patch, run these commands for a successful build:
--- old/clientserver.c
+++ new/clientserver.c
--- old/clientserver.c
+++ new/clientserver.c
-@@ -3
6,6 +36
,7 @@ extern int sanitize_paths;
+@@ -3
7,6 +37
,7 @@ extern int sanitize_paths;
extern int filesfrom_fd;
extern int remote_protocol;
extern int protocol_version;
extern int filesfrom_fd;
extern int remote_protocol;
extern int protocol_version;
@@
-19,7
+19,7
@@
To use this patch, run these commands for a successful build:
extern int io_timeout;
extern int no_detach;
extern int default_af_hint;
extern int io_timeout;
extern int no_detach;
extern int default_af_hint;
-@@ -64
0,6 +641
,8 @@ static int rsync_module(int f_in, int f_
+@@ -64
1,6 +642
,8 @@ static int rsync_module(int f_in, int f_
else if (am_root < 0) /* Treat --fake-super from client as --super. */
am_root = 2;
else if (am_root < 0) /* Treat --fake-super from client as --super. */
am_root = 2;
@@
-30,7
+30,7
@@
To use this patch, run these commands for a successful build:
--- old/flist.c
+++ new/flist.c
--- old/flist.c
+++ new/flist.c
-@@ -2
4,6 +24
,7 @@
+@@ -2
5,6 +25
,7 @@
#include "io.h"
extern int verbose;
#include "io.h"
extern int verbose;
@@
-38,7
+38,7
@@
To use this patch, run these commands for a successful build:
extern int list_only;
extern int am_root;
extern int am_server;
extern int list_only;
extern int am_root;
extern int am_server;
-@@ -5
6,6 +57
,7 @@ extern int implied_dirs;
+@@ -5
7,6 +58
,7 @@ extern int implied_dirs;
extern int file_extra_cnt;
extern int ignore_perishable;
extern int non_perishable_cnt;
extern int file_extra_cnt;
extern int ignore_perishable;
extern int non_perishable_cnt;
@@
-46,7
+46,7
@@
To use this patch, run these commands for a successful build:
extern int prune_empty_dirs;
extern int copy_links;
extern int copy_unsafe_links;
extern int prune_empty_dirs;
extern int copy_links;
extern int copy_unsafe_links;
-@@ -7
8,6 +80
,9 @@ extern iconv_t ic_send, ic_recv;
+@@ -7
9,6 +81
,9 @@ extern iconv_t ic_send, ic_recv;
#define PTR_SIZE (sizeof (struct file_struct *))
#define PTR_SIZE (sizeof (struct file_struct *))
@@
-56,7
+56,7
@@
To use this patch, run these commands for a successful build:
int io_error;
int checksum_len;
dev_t filesystem_dev; /* used to implement -x */
int io_error;
int checksum_len;
dev_t filesystem_dev; /* used to implement -x */
-@@ -10
0,6 +105
,10 @@ static char tmp_sum[MAX_DIGEST_LEN];
+@@ -10
1,6 +106
,10 @@ static char tmp_sum[MAX_DIGEST_LEN];
static char empty_sum[MAX_DIGEST_LEN];
static int flist_count_offset; /* for --delete --progress */
static int dir_count = 0;
static char empty_sum[MAX_DIGEST_LEN];
static int flist_count_offset; /* for --delete --progress */
static int dir_count = 0;
@@
-67,7
+67,7
@@
To use this patch, run these commands for a successful build:
static void clean_flist(struct file_list *flist, int strip_root);
static void output_flist(struct file_list *flist);
static void clean_flist(struct file_list *flist, int strip_root);
static void output_flist(struct file_list *flist);
-@@ -31
6,6 +325
,304 @@ static void flist_done_allocating(struct
+@@ -31
7,6 +326
,304 @@ static void flist_done_allocating(struct
flist->pool_boundary = ptr;
}
flist->pool_boundary = ptr;
}
@@
-118,7
+118,7
@@
To use this patch, run these commands for a successful build:
+ OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32);
+ }
+ file->dirname = dirname;
+ OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32);
+ }
+ file->dirname = dirname;
-+ bp =
(char*)
F_SUM(file);
++ bp = F_SUM(file);
+ memcpy(bp, sum, checksum_len);
+#if SIZEOF_TIME_T == 4
+ OPT_EXTRA(file, LEN64_BUMP(file) + SUM_EXTRA_CNT)->num = ctime;
+ memcpy(bp, sum, checksum_len);
+#if SIZEOF_TIME_T == 4
+ OPT_EXTRA(file, LEN64_BUMP(file) + SUM_EXTRA_CNT)->num = ctime;
@@
-372,7
+372,7
@@
To use this patch, run these commands for a successful build:
int push_pathname(const char *dir, int len)
{
if (dir == pathname)
int push_pathname(const char *dir, int len)
{
if (dir == pathname)
-@@ -97
2,34 +1279
,24 @@ static struct file_struct *recv_file_ent
+@@ -97
3,34 +1280
,24 @@ static struct file_struct *recv_file_ent
return file;
}
return file;
}
@@
-413,7
+413,7
@@
To use this patch, run these commands for a successful build:
char *bp;
if (strlcpy(thisname, fname, sizeof thisname) >= sizeof thisname) {
char *bp;
if (strlcpy(thisname, fname, sizeof thisname) >= sizeof thisname) {
-@@ -107
5,6 +1372
,8 @@ struct file_struct *make_file(const char
+@@ -107
6,6 +1373
,8 @@ struct file_struct *make_file(const char
if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
if (ignore_perishable)
non_perishable_cnt++;
if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
if (ignore_perishable)
non_perishable_cnt++;
@@
-422,7
+422,7
@@
To use this patch, run these commands for a successful build:
return NULL;
}
return NULL;
}
-@@ -111
3,9 +1412
,16 @@ struct file_struct *make_file(const char
+@@ -111
4,9 +1413
,16 @@ struct file_struct *make_file(const char
memcpy(lastdir, thisname, len);
lastdir[len] = '\0';
lastdir_len = len;
memcpy(lastdir, thisname, len);
lastdir[len] = '\0';
lastdir_len = len;
@@
-440,7
+440,7
@@
To use this patch, run these commands for a successful build:
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
-@@ -119
1,11 +1497
,44 @@ struct file_struct *make_file(const char
+@@ -119
2,11 +1498
,44 @@ struct file_struct *make_file(const char
}
#endif
}
#endif
@@
-464,7
+464,7
@@
To use this patch, run these commands for a successful build:
+ if (fp->flags & FLAG_SUM_MISSING) {
+ fp->flags &= ~FLAG_SUM_MISSING;
+ file_checksum(thisname, tmp_sum, st.st_size);
+ if (fp->flags & FLAG_SUM_MISSING) {
+ fp->flags &= ~FLAG_SUM_MISSING;
+ file_checksum(thisname, tmp_sum, st.st_size);
-+ memcpy(
(char*)
F_SUM(fp), tmp_sum, MAX_DIGEST_LEN);
++ memcpy(F_SUM(fp), tmp_sum, MAX_DIGEST_LEN);
+ } else {
+ checksum_matches++;
+ memcpy(tmp_sum, F_SUM(fp), MAX_DIGEST_LEN);
+ } else {
+ checksum_matches++;
+ memcpy(tmp_sum, F_SUM(fp), MAX_DIGEST_LEN);
@@
-488,7
+488,7
@@
To use this patch, run these commands for a successful build:
/* This code is only used by the receiver when it is building
* a list of files for a delete pass. */
if (keep_dirlinks && linkname_len && flist) {
/* This code is only used by the receiver when it is building
* a list of files for a delete pass. */
if (keep_dirlinks && linkname_len && flist) {
-@@ -148
1,6 +1820
,9 @@ static void send_directory(int f, struct
+@@ -148
2,6 +1821
,9 @@ static void send_directory(int f, struct
closedir(d);
closedir(d);
@@
-498,7
+498,7
@@
To use this patch, run these commands for a successful build:
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
-@@ -192
4,7 +2266
,11 @@ struct file_list *send_file_list(int f,
+@@ -192
5,7 +2267
,11 @@ struct file_list *send_file_list(int f,
* file-list to check if this is a 1-file xfer. */
send_extra_file_list(f, 1);
}
* file-list to check if this is a 1-file xfer. */
send_extra_file_list(f, 1);
}
@@
-511,7
+511,7
@@
To use this patch, run these commands for a successful build:
return flist;
}
return flist;
}
-@@ -221
7,7 +2563
,7 @@ void flist_free(struct file_list *flist)
+@@ -221
8,7 +2564
,7 @@ void flist_free(struct file_list *flist)
if (!flist->prev || !flist_cnt)
pool_destroy(flist->file_pool);
if (!flist->prev || !flist_cnt)
pool_destroy(flist->file_pool);
@@
-522,7
+522,7
@@
To use this patch, run these commands for a successful build:
if (flist->sorted && flist->sorted != flist->files)
--- old/loadparm.c
+++ new/loadparm.c
if (flist->sorted && flist->sorted != flist->files)
--- old/loadparm.c
+++ new/loadparm.c
-@@ -14
8,6 +148
,7 @@ typedef struct
+@@ -14
9,6 +149
,7 @@ typedef struct
int syslog_facility;
int timeout;
int syslog_facility;
int timeout;
@@
-530,7
+530,7
@@
To use this patch, run these commands for a successful build:
BOOL fake_super;
BOOL ignore_errors;
BOOL ignore_nonreadable;
BOOL fake_super;
BOOL ignore_errors;
BOOL ignore_nonreadable;
-@@ -19
6,6 +197
,7 @@ static service sDefault =
+@@ -19
7,6 +198
,7 @@ static service sDefault =
/* syslog_facility; */ LOG_DAEMON,
/* timeout; */ 0,
/* syslog_facility; */ LOG_DAEMON,
/* timeout; */ 0,
@@
-538,7
+538,7
@@
To use this patch, run these commands for a successful build:
/* fake_super; */ False,
/* ignore_errors; */ False,
/* ignore_nonreadable; */ False,
/* fake_super; */ False,
/* ignore_errors; */ False,
/* ignore_nonreadable; */ False,
-@@ -31
2,6 +314
,7 @@ static struct parm_struct parm_table[] =
+@@ -31
3,6 +315
,7 @@ static struct parm_struct parm_table[] =
{"lock file", P_STRING, P_LOCAL, &sDefault.lock_file, NULL,0},
{"log file", P_STRING, P_LOCAL, &sDefault.log_file, NULL,0},
{"log format", P_STRING, P_LOCAL, &sDefault.log_format, NULL,0},
{"lock file", P_STRING, P_LOCAL, &sDefault.lock_file, NULL,0},
{"log file", P_STRING, P_LOCAL, &sDefault.log_file, NULL,0},
{"log format", P_STRING, P_LOCAL, &sDefault.log_format, NULL,0},
@@
-546,7
+546,7
@@
To use this patch, run these commands for a successful build:
{"max connections", P_INTEGER,P_LOCAL, &sDefault.max_connections, NULL,0},
{"max verbosity", P_INTEGER,P_LOCAL, &sDefault.max_verbosity, NULL,0},
{"name", P_STRING, P_LOCAL, &sDefault.name, NULL,0},
{"max connections", P_INTEGER,P_LOCAL, &sDefault.max_connections, NULL,0},
{"max verbosity", P_INTEGER,P_LOCAL, &sDefault.max_verbosity, NULL,0},
{"name", P_STRING, P_LOCAL, &sDefault.name, NULL,0},
-@@ -41
7,6 +420
,7 @@ FN_LOCAL_BOOL(lp_fake_super, fake_super)
+@@ -41
8,6 +421
,7 @@ FN_LOCAL_BOOL(lp_fake_super, fake_super)
FN_LOCAL_BOOL(lp_ignore_errors, ignore_errors)
FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable)
FN_LOCAL_BOOL(lp_list, list)
FN_LOCAL_BOOL(lp_ignore_errors, ignore_errors)
FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable)
FN_LOCAL_BOOL(lp_list, list)
@@
-556,7
+556,7
@@
To use this patch, run these commands for a successful build:
FN_LOCAL_BOOL(lp_transfer_logging, transfer_logging)
--- old/options.c
+++ new/options.c
FN_LOCAL_BOOL(lp_transfer_logging, transfer_logging)
--- old/options.c
+++ new/options.c
-@@ -10
8,6 +108
,7 @@ size_t bwlimit_writemax = 0;
+@@ -10
9,6 +109
,7 @@ size_t bwlimit_writemax = 0;
int ignore_existing = 0;
int ignore_non_existing = 0;
int need_messages_from_generator = 0;
int ignore_existing = 0;
int ignore_non_existing = 0;
int need_messages_from_generator = 0;
@@
-564,7
+564,7
@@
To use this patch, run these commands for a successful build:
int max_delete = -1;
OFF_T max_size = 0;
OFF_T min_size = 0;
int max_delete = -1;
OFF_T max_size = 0;
OFF_T min_size = 0;
-@@ -30
1,6 +302
,7 @@ void usage(enum logcode F)
+@@ -30
2,6 +303
,7 @@ void usage(enum logcode F)
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
@@
-572,7
+572,7
@@
To use this patch, run these commands for a successful build:
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
-@@ -54
1,6 +543
,7 @@ static struct poptOption long_options[]
+@@ -54
2,6 +544
,7 @@ static struct poptOption long_options[]
{"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
{"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
{"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
@@
-580,7
+580,7
@@
To use this patch, run these commands for a successful build:
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -189
8,7 +1901
,9 @@ void server_options(char **args,int *arg
+@@ -189
9,7 +1902
,9 @@ void server_options(char **args,int *arg
args[ac++] = basis_dir[i];
}
}
args[ac++] = basis_dir[i];
}
}
@@
-593,15
+593,15
@@
To use this patch, run these commands for a successful build:
args[ac++] = "--append";
--- old/rsync.h
+++ new/rsync.h
args[ac++] = "--append";
--- old/rsync.h
+++ new/rsync.h
-@@ -5
88,6 +588
,7 @@ extern int xattrs_ndx;
- #define
EXTRA_LEN (sizeof (union file_extras))
- #define
PTR_EXTRA_LEN ((sizeof (char *) + EXTRA_LEN - 1) / EXTRA_LEN)
+@@ -5
91,6 +591
,7 @@ extern int xattrs_ndx;
+ #define
DEV_EXTRA_CNT 2
+ #define
DIRNODE_EXTRA_CNT 3
#define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
+#define TIME_EXTRA_CNT ((SIZEOF_TIME_T + EXTRA_LEN - 1) / EXTRA_LEN)
#define REQ_EXTRA(f,ndx) ((union file_extras*)(f) - (ndx))
#define OPT_EXTRA(f,bump) ((union file_extras*)(f) - file_extra_cnt - 1 - (bump))
#define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
+#define TIME_EXTRA_CNT ((SIZEOF_TIME_T + EXTRA_LEN - 1) / EXTRA_LEN)
#define REQ_EXTRA(f,ndx) ((union file_extras*)(f) - (ndx))
#define OPT_EXTRA(f,bump) ((union file_extras*)(f) - file_extra_cnt - 1 - (bump))
-@@ -107
0,6 +1071
,12 @@ isDigit(const char *ptr)
+@@ -107
6,6 +1077
,12 @@ isDigit(const char *ptr)
}
static inline int
}
static inline int