X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/36e715fdf295b975105dce63581d9cf9f154f34f..ae306a2933c7617493d80f46d891911634ec43d0:/preallocate.diff diff --git a/preallocate.diff b/preallocate.diff index 41f4429..f745892 100644 --- a/preallocate.diff +++ b/preallocate.diff @@ -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