From a500946e503549425548e84e0cd23cce11bf7d0d Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Mon, 24 Jul 2023 12:18:15 +0200 Subject: [PATCH] vmur: fix wrong command flag exclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: d5f853c460f0 ("vmur: Remove option -c for dump file conversion") Signed-off-by: Thomas Richter Reported-by: Benjamin Block Reviewed-by: Benjamin Block Signed-off-by: Jan Höppner --- vmur/vmur.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmur/vmur.c b/vmur/vmur.c index eec34066..ab819a04 100644 --- a/vmur/vmur.c +++ b/vmur/vmur.c @@ -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)