From: Lennart Poettering Date: Thu, 3 Nov 2016 19:59:20 +0000 (-0600) Subject: Merge pull request #4510 from keszybz/tree-wide-cleanups X-Git-Tag: v233~464 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=493fd52f1ada36bfe63301d4bb50f7fd2b38c670;p=thirdparty%2Fsystemd.git Merge pull request #4510 from keszybz/tree-wide-cleanups Tree wide cleanups --- 493fd52f1ada36bfe63301d4bb50f7fd2b38c670 diff --cc src/cryptsetup/cryptsetup.c index ff5a3f36fb2,1e17fbbb034..01e7ee9973e --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@@ -180,20 -177,13 +178,21 @@@ static int parse_one_option(const char } else if (streq(option, "tcrypt-system")) { arg_type = CRYPT_TCRYPT; arg_tcrypt_system = true; + } else if (streq(option, "tcrypt-veracrypt")) { +#ifdef CRYPT_TCRYPT_VERA_MODES + arg_type = CRYPT_TCRYPT; + arg_tcrypt_veracrypt = true; +#else + log_error("This version of cryptsetup does not support tcrypt-veracrypt; refusing."); + return -EINVAL; +#endif } else if (STR_IN_SET(option, "plain", "swap", "tmp")) arg_type = CRYPT_PLAIN; - else if (startswith(option, "timeout=")) { + else if ((val = startswith(option, "timeout="))) { - if (parse_sec(option+8, &arg_timeout) < 0) { - log_error("timeout= parse failure, ignoring."); + r = parse_sec(val, &arg_timeout); + if (r < 0) { + log_error_errno(r, "Failed to parse %s, ignoring: %m", option); return 0; }