mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Support keyfile offset and keyfile size option even for plain volumes.
For historic reasons, in the plain mode the hashing is not used if keyfile is used (with exception of --key-file=-). Print warning if the parameters are ignored. For other cases, uses keyfile offset, keyfile size and hash as psecified on commandline. Partially fixes issue#243
This commit is contained in:
@@ -46,6 +46,9 @@ static int device_ready(const char *device)
|
||||
int devfd, r = 0;
|
||||
struct stat st;
|
||||
|
||||
//FIXME: check if device allows to use O_DIRECT
|
||||
// not only on open but also on read (with offset 0)
|
||||
|
||||
log_dbg("Trying to open and read device %s.", device);
|
||||
devfd = open(device, O_RDONLY);
|
||||
if (devfd < 0) {
|
||||
|
||||
Reference in New Issue
Block a user