From abf3adcd2f37f4e278fc9ef7634ca0c8f5171893 Mon Sep 17 00:00:00 2001 From: kavsrf Date: Sun, 5 Feb 2017 17:31:28 +0300 Subject: picture password bmp and DcsProp can be in secregion on separate flash Tables overlay configuration commands --- DcsCfg/DcsCfgMain.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'DcsCfg/DcsCfgMain.c') diff --git a/DcsCfg/DcsCfgMain.c b/DcsCfg/DcsCfgMain.c index 6e4c863..ec92b25 100644 --- a/DcsCfg/DcsCfgMain.c +++ b/DcsCfg/DcsCfgMain.c @@ -81,8 +81,22 @@ https://opensource.org/licenses/LGPL-3.0 #define OPT_TPM_PCRS L"-tpmpcrs" #define OPT_TPM_NVLIST L"-tpmnvlist" #define OPT_TPM_CFG L"-tpmcfg" + +#define OPT_TBL_FILE L"-tbf" +#define OPT_TBL_ZERO L"-tbz" +#define OPT_TBL_LIST L"-tbl" +#define OPT_TBL_NAME L"-tbn" +#define OPT_TBL_DELETE L"-tbd" +#define OPT_TBL_APPEND L"-tba" + STATIC CONST SHELL_PARAM_ITEM ParamList[] = { - { OPT_DISK_LIST, TypeValue }, + { OPT_TBL_FILE, TypeValue }, + { OPT_TBL_ZERO, TypeFlag }, + { OPT_TBL_LIST, TypeFlag }, + { OPT_TBL_DELETE, TypeFlag }, + { OPT_TBL_NAME, TypeValue }, + { OPT_TBL_APPEND, TypeValue }, + { OPT_DISK_LIST, TypeValue }, { OPT_DISK_CHECK, TypeFlag }, { OPT_DISK_START, TypeValue }, { OPT_DISK_END, TypeValue }, @@ -228,6 +242,34 @@ DcsCfgMain( DcsDiskEntrysFileName = ShellCommandLineGetValue(Package, OPT_PARTITION_FILE); } + if (ShellCommandLineGetFlag(Package, OPT_TBL_FILE)) { + DcsTablesFileName = ShellCommandLineGetValue(Package, OPT_TBL_FILE); + } + + if (ShellCommandLineGetFlag(Package, OPT_TBL_DELETE) && + ShellCommandLineGetFlag(Package, OPT_TBL_NAME) + ) { + CONST CHAR16* opt1 = NULL; + opt1 = ShellCommandLineGetValue(Package, OPT_TBL_NAME); + res = TablesDel(opt1); + } + + if (ShellCommandLineGetFlag(Package, OPT_TBL_APPEND) && + ShellCommandLineGetFlag(Package, OPT_TBL_NAME) + ) { + CONST CHAR16* opt1 = NULL; + CONST CHAR16* opt2 = NULL; + opt1 = ShellCommandLineGetValue(Package, OPT_TBL_NAME); + opt2 = ShellCommandLineGetValue(Package, OPT_TBL_APPEND); + res = TablesNew(opt1, opt2); + } + + if (ShellCommandLineGetFlag(Package, OPT_TBL_LIST)) { + if (gDcsTables == NULL) TablesLoad(); + OUT_PRINT(L"Size = %d, Zones=%d\n", gDcsTablesSize, (gDcsTablesSize + 128 * 1024 - 1) / (128 * 1024)); + TablesList(gDcsTablesSize, gDcsTables); + } + if (ShellCommandLineGetFlag(Package, OPT_AUTH_ASK)) { TestAuthAsk(); } -- cgit v1.2.3