And fix previous comment once more... :)
authorMilan Broz <gmazyland@gmail.com>
Fri, 30 Nov 2012 12:52:03 +0000 (13:52 +0100)
committerMilan Broz <gmazyland@gmail.com>
Fri, 30 Nov 2012 12:52:03 +0000 (13:52 +0100)
lib/tcrypt/tcrypt.c
src/cryptsetup.c

index 69a70b4..594408a 100644 (file)
@@ -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)
index 820fdba..7320ad6 100644 (file)
@@ -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;
        }