mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Wiping empty device should not fail.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user