summaryrefslogtreecommitdiff
path: root/src/cryptsetup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-17 04:02:35 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-17 04:02:35 +0100
commitf6a6225e414858ff222d2b175369cc42459abf9a (patch)
treec4c15d546c5c514d2d7dfabbf64d10944e9edc85 /src/cryptsetup.c
parentb74949bcdc65982a5eaca64c836f4d2a3b8a8d0c (diff)
def: centralize definition of default timeout in one place
Diffstat (limited to 'src/cryptsetup.c')
-rw-r--r--src/cryptsetup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptsetup.c b/src/cryptsetup.c
index 989734be1b..3aa822a1d0 100644
--- a/src/cryptsetup.c
+++ b/src/cryptsetup.c
@@ -31,6 +31,7 @@
#include "util.h"
#include "strv.h"
#include "ask-password-api.h"
+#include "def.h"
static const char *opt_type = NULL; /* LUKS1 or PLAIN */
static char *opt_cipher = NULL;
@@ -308,7 +309,7 @@ int main(int argc, char *argv[]) {
if (opt_readonly)
flags |= CRYPT_ACTIVATE_READONLY;
- until = now(CLOCK_MONOTONIC) + (opt_timeout > 0 ? opt_timeout : 60 * USEC_PER_SEC);
+ until = now(CLOCK_MONOTONIC) + (opt_timeout > 0 ? opt_timeout : DEFAULT_TIMEOUT_USEC);
opt_tries = opt_tries > 0 ? opt_tries : 3;
opt_key_size = (opt_key_size > 0 ? opt_key_size : 256);