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

@@ -65,6 +65,7 @@ void crypt_free_volume_key(struct volume_key *vk);
/* Device backend */
struct device;
int device_alloc(struct device **device, const char *path);
int device_alloc_no_check(struct device **device, const char *path);
void device_free(struct device *device);
const char *device_path(const struct device *device);
const char *device_block_path(const struct device *device);