mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Print a visible error if requesting resize on unsupported format.
Fixes: #571.
This commit is contained in:
@@ -2765,6 +2765,11 @@ int crypt_resize(struct crypt_device *cd, const char *name, uint64_t new_size)
|
||||
if (!cd || !cd->type || !name)
|
||||
return -EINVAL;
|
||||
|
||||
if (isTCRYPT(cd->type) || isBITLK(cd->type)) {
|
||||
log_err(cd, _("This operation is not supported for this device type."));
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
log_dbg(cd, "Resizing device %s to %" PRIu64 " sectors.", name, new_size);
|
||||
|
||||
r = dm_query_device(cd, name, DM_ACTIVE_CRYPT_KEYSIZE | DM_ACTIVE_CRYPT_KEY, &dmdq);
|
||||
|
||||
Reference in New Issue
Block a user