The patches for 3.0.4pre2.
[rsync/rsync-patches.git] / copy-devices.diff
index 3daa57f..026b371 100644 (file)
@@ -19,7 +19,7 @@ diff --git a/generator.c b/generator.c
  extern int preserve_specials;
  extern int preserve_hard_links;
  extern int preserve_executability;
-@@ -1688,7 +1689,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1689,7 +1690,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
@@ -55,16 +55,16 @@ diff --git a/options.c b/options.c
    {"specials",         0,  POPT_ARG_VAL,    &preserve_specials, 1, 0, 0 },
    {"no-specials",      0,  POPT_ARG_VAL,    &preserve_specials, 0, 0, 0 },
    {"links",           'l', POPT_ARG_VAL,    &preserve_links, 1, 0, 0 },
-@@ -2053,6 +2056,9 @@ void server_options(char **args, int *argc_p)
+@@ -2061,6 +2064,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
 +      if (copy_devices)
 +              args[ac++] = "--copy-devices";
 +
-       *argc_p = ac;
-       return;
+       if (ac > MAX_SERVER_ARGS) { /* Not possible... */
+               rprintf(FERROR, "argc overflow in server_options().\n");
+               exit_cleanup(RERR_MALLOC);
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
@@ -76,7 +76,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_sender;
-@@ -326,7 +327,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
+@@ -339,7 +340,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
  
        if (iflags & ITEM_TRANSFER) {
                int i = ndx - cur_flist->ndx_start;