From 4f7262aa9680e57df60303146b12c4120783b98c Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Fri, 30 Nov 2012 13:52:03 +0100 Subject: [PATCH] And fix previous comment once more... :) --- lib/tcrypt/tcrypt.c | 2 +- src/cryptsetup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tcrypt/tcrypt.c b/lib/tcrypt/tcrypt.c index 69a70b49..594408a8 100644 --- a/lib/tcrypt/tcrypt.c +++ b/lib/tcrypt/tcrypt.c @@ -512,7 +512,7 @@ static int TCRYPT_init_hdr(struct crypt_device *cd, break; } - if (skipped == i || r == -ENOTSUP) + if ((skipped && skipped == i) || r == -ENOTSUP) log_err(cd, _("Required kernel crypto interface not available.\n" "Ensure you have algif_skcipher kernel module loaded.\n")); if (r < 0) diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 820fdbab..7320ad64 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -512,7 +512,7 @@ static int action_benchmark(int arg __attribute__((unused))) log_std("%11s %4db %12s %12s\n", cipher, bciphers[i].key_size*8, _("N/A"), _("N/A")); } - if (skipped == i) + if (skipped && skipped == i) r = -ENOTSUP; }