chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
units: set stdout of kmsg syslogd to /dev/null
[elogind.git]
/
src
/
cryptsetup.c
diff --git
a/src/cryptsetup.c
b/src/cryptsetup.c
index 3aa822a1d020591f618e5f6e18b8faab467d65f4..f52a41b995dbe8ca4bbf253daa72ef589eea5b57 100644
(file)
--- 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;
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);
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);
if (!opt_type || streq(opt_type, CRYPT_LUKS1))
k = crypt_load(cd, CRYPT_LUKS1, NULL);