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 (parent:
afbebe1
)
No need to check-for/complain-about a lack of hard links for the
author
Wayne Davison
<wayned@samba.org>
Thu, 29 Jul 2004 16:35:24 +0000
(16:35 +0000)
committer
Wayne Davison
<wayned@samba.org>
Thu, 29 Jul 2004 16:35:24 +0000
(16:35 +0000)
--compare-dest option.
compare-dest.diff
patch
|
blob
|
blame
|
history
diff --git
a/compare-dest.diff
b/compare-dest.diff
index
a5f1c94
..
28e8082
100644
(file)
--- a/
compare-dest.diff
+++ b/
compare-dest.diff
@@
-49,15
+49,15
@@
Before compiling, be sure to run "make proto".
- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, compare_dest, fname);
- if (link_stat(fnamecmpbuf, &st, 0) == 0
- && S_ISREG(st.st_mode)) {
- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, compare_dest, fname);
- if (link_stat(fnamecmpbuf, &st, 0) == 0
- && S_ISREG(st.st_mode)) {
-+ int i;
-+
for (i = 0; compare_dest[i] != NULL; i++)
{
++ int i
= 0
;
++
do
{
+ pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, compare_dest[i], fname);
+ if (link_stat(fnamecmpbuf, &st, 0) == 0
+ && S_ISREG(st.st_mode)) {
+ statret = 0;
+ break;
+ }
+ pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, compare_dest[i], fname);
+ if (link_stat(fnamecmpbuf, &st, 0) == 0
+ && S_ISREG(st.st_mode)) {
+ statret = 0;
+ break;
+ }
-+ }
++ }
while (compare_dest[++i] != NULL);
+ if (statret == 0) {
#if HAVE_LINK
if (link_dest && !dry_run) {
+ if (statret == 0) {
#if HAVE_LINK
if (link_dest && !dry_run) {
@@
-90,8
+90,8
@@
Before compiling, be sure to run "make proto".
if (preserve_hard_links)
init_hard_links(flist);
if (preserve_hard_links)
init_hard_links(flist);
---- orig/options.c 2004-07-2
6 16:43:48
-+++ options.c 2004-07-2
3 22:04:42
+--- orig/options.c 2004-07-2
9 16:08:03
++++ options.c 2004-07-2
9 16:31:11
@@ -114,12 +114,13 @@ int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
@@ -114,12 +114,13 @@ int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
@@
-135,12
+135,11
@@
Before compiling, be sure to run "make proto".
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -594,8 +596,
36
@@ int parse_arguments(int *argc, const cha
+@@ -594,8 +596,
28
@@ int parse_arguments(int *argc, const cha
select_timeout = io_timeout;
break;
+ case OPT_COMPARE_DEST:
select_timeout = io_timeout;
break;
+ case OPT_COMPARE_DEST:
-+#if HAVE_LINK
+ if (num_comp_dest >= MAX_COMP_DEST-1) {
+ rprintf(FERROR, "ERROR: %s\n", "too many --compare-dest args given");
+ return 0;
+ if (num_comp_dest >= MAX_COMP_DEST-1) {
+ rprintf(FERROR, "ERROR: %s\n", "too many --compare-dest args given");
+ return 0;
@@
-151,13
+150,6
@@
Before compiling, be sure to run "make proto".
+ compare_dest[num_comp_dest++] = (char *)arg;
+ saw_compare_dest = 1;
+ break;
+ compare_dest[num_comp_dest++] = (char *)arg;
+ saw_compare_dest = 1;
+ break;
-+#else
-+ snprintf(err_buf, sizeof err_buf,
-+ "hard links are not supported on this %s\n",
-+ am_server ? "server" : "client");
-+ rprintf(FERROR, "ERROR: %s", err_buf);
-+ return 0;
-+#endif
+
case OPT_LINK_DEST:
#if HAVE_LINK
+
case OPT_LINK_DEST:
#if HAVE_LINK
@@
-172,7
+164,7
@@
Before compiling, be sure to run "make proto".
link_dest = 1;
break;
#else
link_dest = 1;
break;
#else
-@@ -693,6 +7
23
,11 @@ int parse_arguments(int *argc, const cha
+@@ -693,6 +7
15
,11 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
exit_cleanup(RERR_SYNTAX);
}
@@
-184,7
+176,7
@@
Before compiling, be sure to run "make proto".
if (archive_mode) {
if (!files_from)
recurse = 1;
if (archive_mode) {
if (!files_from)
recurse = 1;
-@@ -723,8 +75
8
,6 @@ int parse_arguments(int *argc, const cha
+@@ -723,8 +75
0
,6 @@ int parse_arguments(int *argc, const cha
tmpdir = alloc_sanitize_path(tmpdir, curr_dir);
if (partial_dir)
partial_dir = alloc_sanitize_path(partial_dir, curr_dir);
tmpdir = alloc_sanitize_path(tmpdir, curr_dir);
if (partial_dir)
partial_dir = alloc_sanitize_path(partial_dir, curr_dir);
@@
-193,7
+185,7
@@
Before compiling, be sure to run "make proto".
if (backup_dir)
backup_dir = alloc_sanitize_path(backup_dir, curr_dir);
if (files_from)
if (backup_dir)
backup_dir = alloc_sanitize_path(backup_dir, curr_dir);
if (files_from)
-@@ -83
6,8 +869
,8 @@ int parse_arguments(int *argc, const cha
+@@ -83
9,8 +864
,8 @@ int parse_arguments(int *argc, const cha
**/
void server_options(char **args,int *argc)
{
**/
void server_options(char **args,int *argc)
{
@@
-203,7
+195,7
@@
Before compiling, be sure to run "make proto".
char *arg;
int i, x;
char *arg;
int i, x;
-@@ -10
18,13 +1051
,16 @@ void server_options(char **args,int *arg
+@@ -10
21,13 +1046
,16 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
args[ac++] = tmpdir;
}
@@
-233,7
+225,7
@@
Before compiling, be sure to run "make proto".
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
---- orig/rsync.h 2004-07-2
7 23:23:54
+--- orig/rsync.h 2004-07-2
9 16:08:03
+++ rsync.h 2004-07-03 17:33:30
@@ -98,6 +98,8 @@
+++ rsync.h 2004-07-03 17:33:30
@@ -98,6 +98,8 @@