X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/998e0bab068d64092214e4e923e518c599faff61..84495354e9d02c3c1d87229516f97b393f15d590:/copy-devices.diff diff --git a/copy-devices.diff b/copy-devices.diff index 21a9ceb..3f74a04 100644 --- a/copy-devices.diff +++ b/copy-devices.diff @@ -18,7 +18,7 @@ To use this patch, run these commands for a successful build: extern int preserve_specials; extern int preserve_hard_links; extern int preserve_perms; -@@ -1477,7 +1478,7 @@ static void recv_generator(char *fname, +@@ -1480,7 +1481,7 @@ static void recv_generator(char *fname, goto cleanup; } @@ -37,7 +37,7 @@ To use this patch, run these commands for a successful build: int preserve_links = 0; int preserve_hard_links = 0; int preserve_acls = 0; -@@ -334,6 +335,7 @@ void usage(enum logcode F) +@@ -341,6 +342,7 @@ void usage(enum logcode F) rprintf(F," -o, --owner preserve owner (super-user only)\n"); rprintf(F," -g, --group preserve group\n"); rprintf(F," --devices preserve device files (super-user only)\n"); @@ -45,7 +45,7 @@ To use this patch, run these commands for a successful build: rprintf(F," --specials preserve special files\n"); rprintf(F," -D same as --devices --specials\n"); rprintf(F," -t, --times preserve modification times\n"); -@@ -488,6 +490,7 @@ static struct poptOption long_options[] +@@ -496,6 +498,7 @@ static struct poptOption long_options[] {"no-D", 0, POPT_ARG_NONE, 0, OPT_NO_D, 0, 0 }, {"devices", 0, POPT_ARG_VAL, &preserve_devices, 1, 0, 0 }, {"no-devices", 0, POPT_ARG_VAL, &preserve_devices, 0, 0, 0 }, @@ -53,27 +53,27 @@ To use this patch, run these commands for a successful build: {"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 }, -@@ -1944,6 +1947,9 @@ void server_options(char **args,int *arg +@@ -1978,6 +1981,9 @@ void server_options(char **args, int *ar else if (remove_source_files) args[ac++] = "--remove-sent-files"; + if (copy_devices) + args[ac++] = "--copy-devices"; + - *argc = ac; + *argc_p = ac; return; --- old/rsync.c +++ new/rsync.c -@@ -34,6 +34,7 @@ extern int preserve_perms; +@@ -33,6 +33,7 @@ extern int preserve_xattrs; + extern int preserve_perms; extern int preserve_executability; extern int preserve_times; - extern int omit_dir_times; +extern int copy_devices; extern int am_root; extern int am_server; extern int am_sender; -@@ -220,7 +221,8 @@ int read_ndx_and_attrs(int f_in, int *if +@@ -219,7 +220,8 @@ int read_ndx_and_attrs(int f_in, int *if if (iflags & ITEM_TRANSFER) { int i = ndx - cur_flist->ndx_start;