Fix isLuks to initialise crypto backend (blkid instead is suggested anyway).
authorMilan Broz <gmazyland@gmail.com>
Sat, 1 May 2010 14:01:43 +0000 (14:01 +0000)
committerMilan Broz <gmazyland@gmail.com>
Sat, 1 May 2010 14:01:43 +0000 (14:01 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@213 36d66b0a-2a48-0410-832c-cd162a569da5

ChangeLog
lib/setup.c

index fafe590..aaf5bcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * Fix apitest to work on older systems.
        * Allow no hash specification in plain device constructor.
        * Fix luksOpen reading of passphrase on stdin (if "-" keyfile specified).
+       * Fix isLuks to initialise crypto backend (blkid instead is suggested anyway).
 
 2010-04-12  Milan Broz  <mbroz@redhat.com>
        * Fix package config to use proper package version.
index 6ac6c96..bf37ecb 100644 (file)
@@ -922,6 +922,11 @@ int crypt_isLuks(struct crypt_options *options)
 
        log_dbg("Check device %s for LUKS header.", options->device);
 
+       if (init_crypto()) {
+               log_err(cd, _("Cannot initialize crypto backend.\n"));
+               return -ENOSYS;
+       }
+
        r = crypt_init(&cd, options->device);
        if (r < 0)
                return -EINVAL;