This patch is for issue #287
In the code for returning block size ( device_block_size_fd in lib/utils_device.c ),
always returns zero in case of files and device_read_test is not executed.
This patch is to fix device_block_size_fd to return block size correctly incase of files.
Signed-off-by: Athira Rajeevatrajeev@linux.vnet.ibm.com
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
Allocate loop device late (only when real block device needed).
Rework underlying device/file access functions.
Move all device (and ioctl) access to utils_device.c.
Allows using file where appropriate without allocation loop device.