From c3e095969f6965e400b3282f795daefd55e60ad8 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Thu, 7 May 2020 09:15:45 +0200 Subject: [PATCH] Skip 4k Bitlk images (some older systems cannot activate them). --- lib/bitlk/bitlk.c | 2 +- tests/bitlk-compat-test | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bitlk/bitlk.c b/lib/bitlk/bitlk.c index 8b9b8550..6f77f750 100644 --- a/lib/bitlk/bitlk.c +++ b/lib/bitlk/bitlk.c @@ -729,7 +729,7 @@ int BITLK_dump(struct crypt_device *cd, struct device *device, struct bitlk_meta log_std(cd, "Info for BITLK%s device %s.\n", params->togo ? " To Go" : "", device_path(device)); log_std(cd, "Version: \t%u\n", params->metadata_version); log_std(cd, "GUID: \t%s\n", params->guid); - log_std(cd, "Sector size: \t%u\n", params->sector_size); + log_std(cd, "Sector size: \t%u [bytes]\n", params->sector_size); log_std(cd, "Created: \t%s", ctime((time_t *)&(params->creation_time))); log_std(cd, "Description: \t%s\n", params->description); log_std(cd, "Cipher name: \t%s\n", params->cipher); diff --git a/tests/bitlk-compat-test b/tests/bitlk-compat-test index 88b74c32..38efd0bf 100755 --- a/tests/bitlk-compat-test +++ b/tests/bitlk-compat-test @@ -106,6 +106,7 @@ for file in $(ls $TST_DIR/bitlk-*) ; do [ $ret -eq 1 ] && ( echo "$file" | grep -q -e "aes-cbc-elephant" ) && echo " [N/A]" && continue [ $ret -eq 1 ] && ( echo "$file" | grep -q -e "clearkey" ) && echo " [N/A]" && continue [ $ret -eq 1 ] && ( echo "$file" | grep -q -e "eow" ) && echo " [N/A]" && continue + [ $ret -eq 1 ] && ( echo "$file" | grep -q -e "-4k.img" ) && echo " [N/A]" && continue [ $ret -eq 0 ] || fail " failed to open $file ($ret)" $CRYPTSETUP status $MAP >/dev/null || fail $CRYPTSETUP status /dev/mapper/$MAP >/dev/null || fail