Allow manipulate with device with only header on it (no data).
authorMilan Broz <gmazyland@gmail.com>
Fri, 23 Oct 2009 10:43:03 +0000 (10:43 +0000)
committerMilan Broz <gmazyland@gmail.com>
Fri, 23 Oct 2009 10:43:03 +0000 (10:43 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@133 36d66b0a-2a48-0410-832c-cd162a569da5

lib/setup.c

index 246795b..c3f2e6c 100644 (file)
@@ -259,7 +259,7 @@ static int device_check_and_adjust(struct crypt_device *cd,
                        log_err(cd, _("Device %s has zero size.\n"), device);
                        return -ENOTBLK;
                }
-               if (*size <= *offset) {
+               if (*size < *offset) {
                        log_err(cd, _("Device %s is too small.\n"), device);
                        return -EINVAL;
                }