X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/5befb07913169aa9449c29914401fccaa544677a..c8a8b4a7fd58ee1ee8b055a1559c71c9921d8753:/preallocate.diff diff --git a/preallocate.diff b/preallocate.diff index 6bc918c..2e825cf 100644 --- a/preallocate.diff +++ b/preallocate.diff @@ -22,7 +22,7 @@ To use this patch, run these commands for a successful build: if test $ac_cv_func_getpgrp = yes; then --- old/options.c +++ new/options.c -@@ -70,6 +70,7 @@ int remove_source_files = 0; +@@ -71,6 +71,7 @@ int remove_source_files = 0; int one_file_system = 0; int protocol_version = PROTOCOL_VERSION; int sparse_files = 0; @@ -30,7 +30,7 @@ To use this patch, run these commands for a successful build: int do_compression = 0; int def_compress_level = Z_DEFAULT_COMPRESSION; int am_root = 0; /* 0 = normal, 1 = root, 2 = --super, -1 = --fake-super */ -@@ -220,6 +221,7 @@ static void print_rsync_version(enum log +@@ -221,6 +222,7 @@ static void print_rsync_version(enum log char const *links = "no "; char const *iconv = "no "; char const *ipv6 = "no "; @@ -38,7 +38,7 @@ To use this patch, run these commands for a successful build: STRUCT_STAT *dumstat; #if SUBPROTOCOL_VERSION != 0 -@@ -249,6 +251,9 @@ static void print_rsync_version(enum log +@@ -250,6 +252,9 @@ static void print_rsync_version(enum log #ifdef ICONV_OPTION iconv = ""; #endif @@ -48,7 +48,7 @@ To use this patch, run these commands for a successful build: rprintf(f, "%s version %s protocol version %d%s\n", RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol); -@@ -262,8 +267,8 @@ static void print_rsync_version(enum log +@@ -263,8 +268,8 @@ static void print_rsync_version(enum log (int)(sizeof (int64) * 8)); rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n", got_socketpair, hardlinks, links, ipv6, have_inplace); @@ -59,7 +59,7 @@ To use this patch, run these commands for a successful build: #ifdef MAINTAINER_MODE rprintf(f, "Panic Action: \"%s\"\n", get_panic_action()); -@@ -350,6 +355,9 @@ void usage(enum logcode F) +@@ -351,6 +356,9 @@ void usage(enum logcode F) rprintf(F," --fake-super store/recover privileged attrs using xattrs\n"); #endif rprintf(F," -S, --sparse handle sparse files efficiently\n"); @@ -69,7 +69,7 @@ To use this patch, run these commands for a successful build: rprintf(F," -n, --dry-run show what would have been transferred\n"); rprintf(F," -W, --whole-file copy files whole (without rsync algorithm)\n"); rprintf(F," -x, --one-file-system don't cross filesystem boundaries\n"); -@@ -525,6 +533,7 @@ static struct poptOption long_options[] +@@ -528,6 +536,7 @@ static struct poptOption long_options[] {"max-size", 0, POPT_ARG_STRING, &max_size_arg, OPT_MAX_SIZE, 0, 0 }, {"min-size", 0, POPT_ARG_STRING, &min_size_arg, OPT_MIN_SIZE, 0, 0 }, {"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 }, @@ -77,7 +77,7 @@ To use this patch, run these commands for a successful build: {"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 }, {"append", 0, POPT_ARG_NONE, 0, OPT_APPEND, 0, 0 }, {"append-verify", 0, POPT_ARG_VAL, &append_mode, 2, 0, 0 }, -@@ -1279,6 +1288,15 @@ int parse_arguments(int *argc_p, const c +@@ -1285,6 +1294,15 @@ int parse_arguments(int *argc_p, const c } #endif @@ -93,7 +93,7 @@ To use this patch, run these commands for a successful build: if (write_batch && read_batch) { snprintf(err_buf, sizeof err_buf, "--write-batch and --read-batch can not be used together\n"); -@@ -1978,6 +1996,9 @@ void server_options(char **args, int *ar +@@ -1992,6 +2010,9 @@ void server_options(char **args, int *ar else if (remove_source_files) args[ac++] = "--remove-sent-files"; @@ -156,7 +156,7 @@ To use this patch, run these commands for a successful build: if (do_progress) --- old/rsync.h +++ new/rsync.h -@@ -555,6 +555,10 @@ struct ht_int64_node { +@@ -564,6 +564,10 @@ struct ht_int64_node { #define ACLS_NEED_MASK 1 #endif @@ -169,7 +169,7 @@ To use this patch, run these commands for a successful build: uint32 unum; --- old/rsync.yo +++ new/rsync.yo -@@ -357,6 +357,7 @@ to the detailed description below for a +@@ -353,6 +353,7 @@ to the detailed description below for a --super receiver attempts super-user activities --fake-super store/recover privileged attrs using xattrs -S, --sparse handle sparse files efficiently @@ -177,7 +177,7 @@ To use this patch, run these commands for a successful build: -n, --dry-run show what would have been transferred -W, --whole-file copy files whole (without rsync algorithm) -x, --one-file-system don't cross filesystem boundaries -@@ -993,6 +994,19 @@ NOTE: Don't use this option when the des +@@ -1009,6 +1010,19 @@ NOTE: Don't use this option when the des filesystem. It doesn't seem to handle seeks over null regions correctly and ends up corrupting the files. @@ -209,7 +209,7 @@ To use this patch, run these commands for a successful build: int human_readable = 0; --- old/util.c +++ new/util.c -@@ -24,6 +24,7 @@ +@@ -25,6 +25,7 @@ extern int verbose; extern int dry_run; @@ -217,7 +217,7 @@ To use this patch, run these commands for a successful build: extern int module_id; extern int modify_window; extern int relative_paths; -@@ -270,6 +271,10 @@ int copy_file(const char *source, const +@@ -271,6 +272,10 @@ int copy_file(const char *source, const int ofd; char buf[1024 * 8]; int len; /* Number of bytes read into `buf'. */ @@ -226,9 +226,9 @@ To use this patch, run these commands for a successful build: + int offset = 0; +#endif - ifd = do_open(source, O_RDONLY, 0); - if (ifd == -1) { -@@ -289,7 +294,27 @@ int copy_file(const char *source, const + if ((ifd = do_open(source, O_RDONLY, 0)) < 0) { + rsyserr(FERROR, errno, "open %s", full_fname(source)); +@@ -290,7 +295,27 @@ int copy_file(const char *source, const return -1; } @@ -256,7 +256,7 @@ To use this patch, run these commands for a successful build: if (full_write(ofd, buf, len) < 0) { rsyserr(FERROR, errno, "write %s", full_fname(dest)); close(ifd); -@@ -310,6 +335,16 @@ int copy_file(const char *source, const +@@ -311,6 +336,16 @@ int copy_file(const char *source, const full_fname(source)); }