Allow to open device without read check.

In some specific situation we do not want to read the devices
before initialization.

Here it is integrity checking that will produce warning, because
the device is not yet initialized.

Used only in wipe function (here we must use direct-io anyway)
and expect the device is capable of direct-io.
This commit is contained in:
Milan Broz
2017-07-27 12:56:07 +02:00
parent 5824e8d242
commit 12040570ca
3 changed files with 23 additions and 8 deletions

View File

@@ -239,7 +239,7 @@ int crypt_wipe(struct crypt_device *cd,
if (!dev_path)
device = crypt_data_device(cd);
else {
r = device_alloc(&device, dev_path);
r = device_alloc_no_check(&device, dev_path);
if (r < 0)
return r;