Complain if the user combines --read-batch with --files-from.
authorWayne Davison <wayned@samba.org>
Wed, 21 Jul 2004 22:50:11 +0000 (22:50 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 21 Jul 2004 22:50:11 +0000 (22:50 +0000)
options.c

index 27457f0906b9eed7659fe7c29226bc44dbb773b1..d60f54ee18c88ace3e81df2f27b197702dfcd30a 100644 (file)
--- a/options.c
+++ b/options.c
@@ -651,7 +651,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
 
        if (write_batch && read_batch) {
                rprintf(FERROR,
-                       "write-batch and read-batch can not be used together\n");
+                       "--write-batch and --read-batch can not be used together\n");
                exit_cleanup(RERR_SYNTAX);
        }
        if (write_batch || read_batch) {
@@ -672,6 +672,11 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                        batch_name = NULL;
                }
        }
+       if (read_batch && files_from) {
+               rprintf(FERROR,
+                       "--read-batch cannot be used with --files-from\n");
+               exit_cleanup(RERR_SYNTAX);
+       }
        if (batch_name && strlen(batch_name) > MAX_BATCH_NAME_LEN) {
                rprintf(FERROR,
                        "the batch-file name must be %d characters or less.\n",