From ba326929706ec4dc8ab8bc0a09868bcd6fd6d75f Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Fri, 8 Apr 2011 21:20:49 -0300 Subject: blkdev: add blkdev_is_misaligned() This functions returns the status of the device's alignment. It will be 0 when aligned, otherwise return the offset. [kzak@redhat.com: - returns 0 if the ioctl failed] Signed-off-by: Davidlohr Bueso Signed-off-by: Karel Zak --- include/blkdev.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/blkdev.h') diff --git a/include/blkdev.h b/include/blkdev.h index b6c46edde..6a641723f 100644 --- a/include/blkdev.h +++ b/include/blkdev.h @@ -92,4 +92,7 @@ int blkdev_get_sectors(int fd, unsigned long long *sectors); /* get hardware sector size */ int blkdev_get_sector_size(int fd, int *sector_size); +/* specifies whether or not the device is misaligned */ +int blkdev_is_misaligned(int fd); + #endif /* BLKDEV_H */ -- cgit v1.2.3-55-g7522