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: 5e0c61f64d
This commit is contained in:
committed by
Yu Watanabe
parent
f40aa8ea1c
commit
e8454eb14c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user