From 879e06db39cb2d1113bb64a9ec0b5480cb837fca Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Thu, 11 Oct 2018 15:38:56 +0200 Subject: [PATCH 061/324] Wiping empty device should not fail. --- lib/utils_wipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils_wipe.c b/lib/utils_wipe.c index 77550c7..04cc531 100644 --- a/lib/utils_wipe.c +++ b/lib/utils_wipe.c @@ -161,7 +161,7 @@ int crypt_wipe_device(struct crypt_device *cd, return errno ? -errno : -EINVAL; r = device_size(device, &dev_size); - if (r) + if (r || dev_size == 0) goto out; if (length) { -- 2.19.1