The patches for 3.0.4pre2.
[rsync/rsync-patches.git] / preallocate.diff
index 41f4429..f745892 100644 (file)
@@ -20,7 +20,7 @@ diff --git a/compat.c b/compat.c
  extern int append_mode;
  extern int fuzzy_basis;
  extern int read_batch;
-@@ -184,6 +185,15 @@ void setup_protocol(int f_out,int f_in)
+@@ -187,6 +188,15 @@ void setup_protocol(int f_out,int f_in)
        if (read_batch)
                check_batch_flags();
  
@@ -139,16 +139,16 @@ diff --git a/options.c b/options.c
    {"inplace",          0,  POPT_ARG_VAL,    &inplace, 1, 0, 0 },
    {"no-inplace",       0,  POPT_ARG_VAL,    &inplace, 0, 0, 0 },
    {"append",           0,  POPT_ARG_NONE,   0, OPT_APPEND, 0, 0 },
-@@ -2053,6 +2062,9 @@ void server_options(char **args, int *argc_p)
+@@ -2061,6 +2070,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
 +      if (preallocate_files && am_sender)
 +              args[ac++] = "--preallocate";
 +
-       *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/receiver.c b/receiver.c
 --- a/receiver.c
 +++ b/receiver.c
@@ -203,7 +203,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -612,6 +612,13 @@ struct ht_int64_node {
+@@ -614,6 +614,13 @@ struct ht_int64_node {
  #define ACLS_NEED_MASK 1
  #endif