From 0e75337c31c9e3a963aecd440c8698994464324c Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Mon, 20 Jun 2011 22:51:47 -0400 Subject: lib: [blkdev.c] add blkdev_get_physector_size() This function uses the BLKPBSZGET ioctl to get the physical block size of the device. 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 6a641723f..3ce8111f6 100644 --- a/include/blkdev.h +++ b/include/blkdev.h @@ -95,4 +95,7 @@ int blkdev_get_sector_size(int fd, int *sector_size); /* specifies whether or not the device is misaligned */ int blkdev_is_misaligned(int fd); +/* get physical block device size */ +int blkdev_get_physector_size(int fd, int *sector_size); + #endif /* BLKDEV_H */ -- cgit v1.2.3-55-g7522