X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcryptsetup%2Fcryptsetup.c;h=ae4aa8dba303335ceefaa03f4f8d44c473b3cbf2;hp=d5dc2335c8994e8d9b62c7fc5c5cd6f18691923e;hb=b92bea5d2a9481de69bb627a7b442a9f58fca43d;hpb=74b1c371744d6948094476a4c135afa54b21414b diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index d5dc2335c..ae4aa8dba 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -127,7 +127,7 @@ static int parse_one_option(const char *option) { opt_type = CRYPT_PLAIN; else if (startswith(option, "timeout=")) { - if (parse_usec(option+8, &opt_timeout) < 0) { + if (parse_sec(option+8, &opt_timeout) < 0) { log_error("timeout= parse failure, ignoring."); return 0; } @@ -461,10 +461,7 @@ int main(int argc, char *argv[]) { k = crypt_load(cd, CRYPT_LUKS1, NULL); if ((!opt_type && k < 0) || streq_ptr(opt_type, CRYPT_PLAIN)) { - struct crypt_params_plain params; - - zero(params); - params.hash = hash; + struct crypt_params_plain params = { .hash = hash }; /* for CRYPT_PLAIN limit reads * from keyfile to key length, and