Added the FNAMECMP_CMPDEST define to avoid a literal 0 in the code.
authorWayne Davison <wayned@samba.org>
Wed, 3 Nov 2004 20:19:27 +0000 (20:19 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 3 Nov 2004 20:19:27 +0000 (20:19 +0000)
g2r-basis-filename.diff

index 18cd45d..5227c32 100644 (file)
@@ -8,7 +8,7 @@ support for multiple --compare-dest options).
 You must run "make proto" before compiling.
 
 --- orig/generator.c   2004-10-06 00:12:16
-+++ generator.c        2004-11-03 19:54:11
++++ generator.c        2004-11-03 20:12:24
 @@ -254,14 +254,15 @@ static void generate_and_send_sums(int f
   * out.  It might be wrong.
   */
@@ -41,13 +41,13 @@ You must run "make proto" before compiling.
                                                        safe_fname(fname));
                                        }
                                        fnamecmp = fnamecmpbuf;
-+                                      fnamecmp_type = 0;
++                                      fnamecmp_type = FNAMECMP_CMPDEST;
                                }
                        } else
  #endif
 +                      {
                                fnamecmp = fnamecmpbuf;
-+                              fnamecmp_type = 0;
++                              fnamecmp_type = FNAMECMP_CMPDEST;
 +                      }
                        statret = 0;
                }
@@ -319,7 +319,7 @@ You must run "make proto" before compiling.
        get_redo_num(); /* Read final MSG_DONE and any prior messages. */
        report(-1);
 --- orig/receiver.c    2004-11-03 11:56:04
-+++ receiver.c 2004-11-03 16:28:24
++++ receiver.c 2004-11-03 20:16:38
 @@ -30,6 +30,7 @@ extern int dry_run;
  extern int read_batch;
  extern int batch_gen_fd;
@@ -371,7 +371,7 @@ You must run "make proto" before compiling.
                }
  
                if (server_exclude_list.head
-@@ -426,35 +436,31 @@ int recv_files(int f_in, struct file_lis
+@@ -426,35 +436,32 @@ int recv_files(int f_in, struct file_lis
                        exit_cleanup(RERR_PROTOCOL);
                }
  
@@ -392,6 +392,7 @@ You must run "make proto" before compiling.
 +                      case FNAMECMP_BACKUP:
 +                              fnamecmp = get_backup_name(fname);
 +                              break;
++                      case FNAMECMP_CMPDEST:
 +                      default:
 +                              pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
 +                                       compare_dest, fname);
@@ -427,11 +428,12 @@ You must run "make proto" before compiling.
                        rsyserr(FERROR, errno, "fstat %s failed",
                                full_fname(fnamecmp));
 --- orig/rsync.h       2004-10-09 03:21:56
-+++ rsync.h    2004-11-03 19:53:41
-@@ -119,6 +119,10 @@
++++ rsync.h    2004-11-03 20:11:34
+@@ -119,6 +119,11 @@
  #define PDIR_CREATE   1
  #define PDIR_DELETE   0
  
++#define FNAMECMP_CMPDEST      0x00
 +#define FNAMECMP_FNAME                0x80
 +#define FNAMECMP_PARTIAL_DIR  0x81
 +#define FNAMECMP_BACKUP       0x82