mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: remove dm dev without error even with malformed UUID
On each ioctl return, the device UUID is decoded from \xNN format. If the UUID of the device being *removed* is malformed (e.g. it hasn't been corrected before), just remove it without any error as the UUID is not needed anymore - the device is gone anyway. Otherwise a misleading error message would be issued just after the removal: # dmsetup remove test The UUID "a b" should be mangled but it contains blacklisted characters. Command failed
This commit is contained in:
parent
5a958655dd
commit
abb07a1b5e
@ -1762,7 +1762,8 @@ static struct dm_ioctl *_do_dm_ioctl(struct dm_task *dmt, unsigned command,
|
||||
if (!_dm_ioctl_unmangle_names(dmt->type, dmi))
|
||||
goto error;
|
||||
|
||||
if (!_dm_ioctl_unmangle_uuids(dmt->type, dmi))
|
||||
if (dmt->type != DM_DEVICE_REMOVE &&
|
||||
!_dm_ioctl_unmangle_uuids(dmt->type, dmi))
|
||||
goto error;
|
||||
|
||||
#else /* Userspace alternative for testing */
|
||||
|
Loading…
Reference in New Issue
Block a user