summaryrefslogtreecommitdiff
path: root/src/cryptsetup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptsetup.c')
-rw-r--r--src/cryptsetup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptsetup.c b/src/cryptsetup.c
index 3aa822a1d0..f52a41b995 100644
--- a/src/cryptsetup.c
+++ b/src/cryptsetup.c
@@ -309,7 +309,10 @@ int main(int argc, char *argv[]) {
if (opt_readonly)
flags |= CRYPT_ACTIVATE_READONLY;
- until = now(CLOCK_MONOTONIC) + (opt_timeout > 0 ? opt_timeout : DEFAULT_TIMEOUT_USEC);
+ if (opt_timeout > 0)
+ until = now(CLOCK_MONOTONIC) + opt_timeout;
+ else
+ until = 0;
opt_tries = opt_tries > 0 ? opt_tries : 3;
opt_key_size = (opt_key_size > 0 ? opt_key_size : 256);
@@ -404,6 +407,8 @@ int main(int argc, char *argv[]) {
}
}
+ k = 0;
+
if (!opt_type || streq(opt_type, CRYPT_LUKS1))
k = crypt_load(cd, CRYPT_LUKS1, NULL);