- I decided that we should leave as much of the real mode attached
[rsync/rsync-patches.git] / atimes.diff
index 6ded062..c0fb23b 100644 (file)
@@ -282,6 +282,15 @@ After applying this patch, run these commands for a successful build:
                        if (preserve_hard_links && file->link_u.links) {
                                if (dry_run)
                                        file->link_u.links->link_dest_used = j + 1;
+@@ -930,7 +937,7 @@ static void recv_generator(char *fname, 
+                               rsyserr(FERROR, errno,
+                                       "recv_generator: mkdir %s failed",
+                                       full_fname(fname));
+-                              file->flags |= FLAG_MISSING;
++                              FFLAGS(file) |= FLAG_MISSING;
+                               if (ndx+1 < the_file_list->count
+                                && the_file_list->files[ndx+1]->dir.depth > file->dir.depth) {
+                                       rprintf(FERROR,
 @@ -944,7 +951,7 @@ static void recv_generator(char *fname, 
                    && verbose && code != FNONE && f_out != -1)
                        rprintf(code, "%s/\n", fname);
@@ -300,6 +309,15 @@ After applying this patch, run these commands for a successful build:
        }
  
        /* open the file */
+@@ -1514,7 +1521,7 @@ void generate_files(int f_out, struct fi
+                               continue;
+                       if (!need_retouch_dir_times && file->mode & S_IWUSR)
+                               continue;
+-                      if (file->flags & FLAG_MISSING) {
++                      if (FFLAGS(file) & FLAG_MISSING) {
+                               int missing = file->dir.depth;
+                               while (++i < flist->count) {
+                                       file = flist->files[i];
 --- old/hlink.c
 +++ new/hlink.c
 @@ -30,6 +30,7 @@ extern int make_backups;
@@ -310,7 +328,7 @@ After applying this patch, run these commands for a successful build:
  extern struct file_list *the_file_list;
  
  #ifdef SUPPORT_HARD_LINKS
-@@ -90,10 +91,10 @@ static void link_idev_data(void)
+@@ -91,10 +92,10 @@ static void link_idev_data(void)
                        FPTR(cur)->link_u.links = pool_talloc(hlink_pool,
                            struct hlink, 1, "hlink_list");
  
@@ -320,10 +338,10 @@ After applying this patch, run these commands for a successful build:
                        FPTR(cur)->F_NEXT = head;
 -                      FPTR(cur)->flags |= FLAG_HLINK_EOL;
 +                      FFLAGS(FPTR(cur)) |= FLAG_HLINK_EOL;
+                       FPTR(cur)->link_u.links->link_dest_used = 0;
                        hlink_list[to++] = head;
                } else
-                       FPTR(cur)->link_u.links = NULL;
-@@ -179,7 +180,7 @@ int hard_link_check(struct file_struct *
+@@ -181,7 +182,7 @@ int hard_link_check(struct file_struct *
  {
  #ifdef SUPPORT_HARD_LINKS
        int head;
@@ -332,7 +350,7 @@ After applying this patch, run these commands for a successful build:
                head = hlink_list[file->F_HLINDEX] = file->F_NEXT;
        else
                head = hlink_list[file->F_HLINDEX];
-@@ -287,8 +288,8 @@ void hard_link_cluster(struct file_struc
+@@ -289,8 +290,8 @@ void hard_link_cluster(struct file_struc
        file->F_HLINDEX = FINISHED_LINK;
        if (link_stat(f_name(file, hlink1), &st1, 0) < 0)
                return;
@@ -343,7 +361,7 @@ After applying this patch, run these commands for a successful build:
                        ndx = file->F_NEXT;
                        file = FPTR(ndx);
                }
-@@ -308,6 +309,6 @@ void hard_link_cluster(struct file_struc
+@@ -310,6 +311,6 @@ void hard_link_cluster(struct file_struc
                        send_msg(MSG_SUCCESS, numbuf, 4);
                }
                file->F_HLINDEX = FINISHED_LINK;