VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/DcsCfg/DcsCfgMain.c
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2017-02-05 17:31:28 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 17:36:54 +0200
commitabf3adcd2f37f4e278fc9ef7634ca0c8f5171893 (patch)
treec7fe7706e8648c7a989bcfd30dbc66a1faa108f3 /DcsCfg/DcsCfgMain.c
parentd200f27ac3b8a4f58e52a5ee798e11e3fdf74924 (diff)
downloadVeraCrypt-DCS-abf3adcd2f37f4e278fc9ef7634ca0c8f5171893.tar.gz
VeraCrypt-DCS-abf3adcd2f37f4e278fc9ef7634ca0c8f5171893.zip
picture password bmp and DcsProp can be in secregion on separate flash
Tables overlay configuration commands
Diffstat (limited to 'DcsCfg/DcsCfgMain.c')
-rw-r--r--DcsCfg/DcsCfgMain.c44
1 files changed, 43 insertions, 1 deletions
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();
}