Allow the -x option to be repeated.
authorWayne Davison <wayned@samba.org>
Sat, 21 Jan 2006 00:36:15 +0000 (00:36 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 21 Jan 2006 00:36:15 +0000 (00:36 +0000)
options.c

index 6391909..704833a 100644 (file)
--- a/options.c
+++ b/options.c
@@ -425,7 +425,7 @@ static struct poptOption long_options[] = {
   {"chmod",            0,  POPT_ARG_STRING, &chmod_mode, 0, 0, 0 },
   {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },
   {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
-  {"one-file-system", 'x', POPT_ARG_NONE,   &one_file_system, 0, 0, 0 },
+  {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
   {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
   {"existing",         0,  POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },
   {"ignore-non-existing",0,POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },
@@ -891,6 +891,10 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                                quiet++;
                        break;
 
+               case 'x':
+                       one_file_system++;
+                       break;
+
                case OPT_SENDER:
                        if (!am_server) {
                                usage(FERROR);
@@ -1459,8 +1463,11 @@ void server_options(char **args,int *argc)
                argstr[x++] = 'I';
        if (relative_paths)
                argstr[x++] = 'R';
-       if (one_file_system)
+       if (one_file_system) {
                argstr[x++] = 'x';
+               if (one_file_system > 1)
+                       argstr[x++] = 'x';
+       }
        if (sparse_files)
                argstr[x++] = 'S';
        if (do_compression)