Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handle things more grecefully when one machine supports hard links and
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
09e0ef3
..
ce5490a
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-334,8
+334,6
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
if ((pid=fork()) == 0) {
recv_files(f_in,flist,local_name,recv_pipe[1]);
if ((pid=fork()) == 0) {
recv_files(f_in,flist,local_name,recv_pipe[1]);
- if (preserve_hard_links)
- do_hard_links(flist);
if (verbose > 2)
fprintf(FERROR,"receiver read %d\n",read_total());
exit_cleanup(0);
if (verbose > 2)
fprintf(FERROR,"receiver read %d\n",read_total());
exit_cleanup(0);
@@
-555,14
+553,15
@@
int main(int argc,char *argv[])
break;
case 'l':
break;
case 'l':
-#if SUPPORT_LINKS
preserve_links=1;
preserve_links=1;
-#endif
break;
case 'H':
#if SUPPORT_HARD_LINKS
preserve_hard_links=1;
break;
case 'H':
#if SUPPORT_HARD_LINKS
preserve_hard_links=1;
+#else
+ fprintf(FERROR,"ERROR: hard links not supported on this platform\n");
+ exit_cleanup(1);
#endif
break;
#endif
break;
@@
-659,6
+658,13
@@
int main(int argc,char *argv[])
if (dry_run)
verbose = MAX(verbose,1);
if (dry_run)
verbose = MAX(verbose,1);
+#ifndef SUPPORT_LINKS
+ if (!am_server && preserve_links) {
+ fprintf(FERROR,"ERROR: symbolic links not supported\n");
+ exit_cleanup(1);
+ }
+#endif
+
if (am_server) {
setup_protocol(STDOUT_FILENO,STDIN_FILENO);
if (am_server) {
setup_protocol(STDOUT_FILENO,STDIN_FILENO);
@@
-732,6
+738,11
@@
int main(int argc,char *argv[])
setup_protocol(f_out,f_in);
setup_protocol(f_out,f_in);
+#if HAVE_SETLINEBUF
+ setlinebuf(FINFO);
+ setlinebuf(FERROR);
+#endif
+
if (verbose > 3)
fprintf(FERROR,"parent=%d child=%d sender=%d recurse=%d\n",
(int)getpid(),pid,sender,recurse);
if (verbose > 3)
fprintf(FERROR,"parent=%d child=%d sender=%d recurse=%d\n",
(int)getpid(),pid,sender,recurse);