From e8454eb14cc79000cc62d81801150e9bfd84f5ff Mon Sep 17 00:00:00 2001 From: dongshengyuan <545258830@qq.com> Date: Tue, 11 Aug 2026 14:42:00 +0800 Subject: [PATCH] detect-virt: continue parsing after --cvm --cvm is a mode switch, so it must not stop option parsing. Keep parsing after it to honor later options and validate arguments. Before: --cvm --quiet printed none; --cvm unexpected-argument printed none. After: --cvm --quiet prints nothing; extra arguments are rejected. Follow-up for: 5e0c61f64d22ed9d4ae53ed94209ed4be25feb30 --- src/detect-virt/detect-virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c index be39634583..eac8125452 100644 --- a/src/detect-virt/detect-virt.c +++ b/src/detect-virt/detect-virt.c @@ -88,7 +88,7 @@ static int parse_argv(int argc, char *argv[]) { OPTION_LONG("cvm", NULL, "Only detect whether we are run in a confidential VM"): arg_mode = ONLY_CVM; - return 1; + break; OPTION_LONG("list-cvm", NULL, "List all known and detectable types of confidential virtualization"): return DUMP_STRING_TABLE(confidential_virtualization, ConfidentialVirtualization, _CONFIDENTIAL_VIRTUALIZATION_MAX);