vmur: fix wrong command flag exclusion

Command vmur issues a warning and aborts receiving a file from
the reader when either option -t or option -b is specified.
Example:
 ./vmur re -t 0x25,0x40 22 -H /tmp/xxx.txt
 vmur: Conflicting options: -b and -t are mutually exclusive.
This is wrong as there is only one option specified.
The command should be aborted only when both flags are specified.

Fix this wrong behavior.

Fixes: d5f853c460 ("vmur: Remove option -c for dump file conversion")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reported-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Thomas Richter
2023-07-24 12:18:15 +02:00
committed by Jan Höppner
parent b7c9c2679e
commit a500946e50

View File

@@ -838,7 +838,7 @@ static void parse_opts_receive(struct vmur *info, int argc, char *argv[])
if (info->stdout_specified && info->file_name_specified)
ERR_EXIT("File name not allowed, when --stdout specified!\n");
if (info->blocked_specified + info->text_specified)
if (info->blocked_specified + info->text_specified > 1)
ERR_EXIT("Conflicting options: -b and -t are mutually "
"exclusive.\n");
if (!info->spool_class_specified)