* Construct a filtered list of options to pass through from the * client to the server. * * This involves setting options that will tell the server how to * behave, and also filtering out options that are processed only * locally. **/
| 2603 | * locally. |
| 2604 | **/ |
| 2605 | void server_options(char **args, int *argc_p) |
| 2606 | { |
| 2607 | static char argstr[64]; |
| 2608 | int ac = *argc_p; |
| 2609 | uchar where; |
| 2610 | char *arg; |
| 2611 | int i, x; |
| 2612 | |
| 2613 | /* This should always remain first on the server's command-line. */ |
| 2614 | args[ac++] = "--server"; |
| 2615 | |
| 2616 | if (!am_sender) |
| 2617 | args[ac++] = "--sender"; |
| 2618 | |
| 2619 | x = 1; |
| 2620 | argstr[0] = '-'; |
| 2621 | |
| 2622 | if (protect_args) |
| 2623 | argstr[x++] = 's'; |
| 2624 | |
| 2625 | for (i = 0; i < verbose; i++) |
| 2626 | argstr[x++] = 'v'; |
| 2627 | |
| 2628 | if (quiet && msgs2stderr) |
| 2629 | argstr[x++] = 'q'; |
| 2630 | if (make_backups) |
| 2631 | argstr[x++] = 'b'; |
| 2632 | if (update_only) |
| 2633 | argstr[x++] = 'u'; |
| 2634 | if (!do_xfers) /* Note: NOT "dry_run"! */ |
| 2635 | argstr[x++] = 'n'; |
| 2636 | if (preserve_links) |
| 2637 | argstr[x++] = 'l'; |
| 2638 | if ((xfer_dirs >= 2 && xfer_dirs < 4) |
| 2639 | || (xfer_dirs && !recurse && (list_only || (delete_mode && am_sender)))) |
| 2640 | argstr[x++] = 'd'; |
| 2641 | if (am_sender) { |
| 2642 | if (keep_dirlinks) |
| 2643 | argstr[x++] = 'K'; |
| 2644 | if (prune_empty_dirs) |
| 2645 | argstr[x++] = 'm'; |
| 2646 | if (omit_dir_times > 0) |
| 2647 | argstr[x++] = 'O'; |
| 2648 | if (omit_link_times) |
| 2649 | argstr[x++] = 'J'; |
| 2650 | if (fuzzy_basis) { |
| 2651 | argstr[x++] = 'y'; |
| 2652 | if (fuzzy_basis > 1) |
| 2653 | argstr[x++] = 'y'; |
| 2654 | } |
| 2655 | } else { |
| 2656 | if (copy_links) |
| 2657 | argstr[x++] = 'L'; |
| 2658 | if (copy_dirlinks) |
| 2659 | argstr[x++] = 'k'; |
| 2660 | } |
| 2661 | |
| 2662 | if (whole_file > 0) |
no test coverage detected