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;
}
{"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
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;