Do not try to load LUKS2 header if backup_file is LUKS1.

Also do not allow header restore if a different version is requested.
This commit is contained in:
Milan Broz
2017-10-06 12:17:30 +02:00
parent cc5c91158d
commit de2f07b82f
5 changed files with 36 additions and 22 deletions

View File

@@ -693,7 +693,7 @@ void device_disable_direct_io(struct device *device)
device->o_direct = 0;
}
int device_direct_io(struct device *device)
int device_direct_io(const struct device *device)
{
return device->o_direct;
}