DM: VMcfg: support --dump options

run 'acrn-dm --dump <index>' to show build-in parameters

Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
yuhong.tao@intel.com
2018-08-28 23:13:35 +08:00
committed by wenlingz
parent 67d7292081
commit c86da0034e
3 changed files with 44 additions and 0 deletions

View File

@@ -162,6 +162,7 @@ usage(int code)
" -i: ioc boot parameters\n"
#ifdef CONFIG_VM_CFG
" --vmcfg: build-in VM configurations\n"
" --dump: show build-in VM configurations\n"
#endif
" --vsbl: vsbl file path\n"
" --part_info: guest partition info file path\n"
@@ -710,6 +711,7 @@ enum {
CMD_OPT_PTDEV_NO_RESET,
CMD_OPT_DEBUGEXIT,
CMD_OPT_VMCFG,
CMD_OPT_DUMP,
};
static struct option long_options[] = {
@@ -742,6 +744,7 @@ static struct option long_options[] = {
/* Following cmd option only has long option */
#ifdef CONFIG_VM_CFG
{"vmcfg", required_argument, 0, CMD_OPT_VMCFG},
{"dump", required_argument, 0, CMD_OPT_DUMP},
#endif
{"vsbl", required_argument, 0, CMD_OPT_VSBL},
{"part_info", required_argument, 0, CMD_OPT_PART_INFO},
@@ -1047,6 +1050,10 @@ int main(int argc, char *argv[])
vmcfg = 1;
index = atoi(optarg);
break;
case CMD_OPT_DUMP:
index = atoi(optarg);
vmcfg_dump(index, long_options, optstr);
return 0;
default:
dm_options++;
}