summaryrefslogtreecommitdiffstats
path: root/include/blkdev.h
diff options
context:
space:
mode:
authorDavidlohr Bueso2011-06-21 04:51:47 +0200
committerKarel Zak2011-06-27 15:57:31 +0200
commit0e75337c31c9e3a963aecd440c8698994464324c (patch)
tree71da5de3abd74a00ead8a295072a0f83d54979e8 /include/blkdev.h
parentlibmount: minor fixes (diff)
downloadkernel-qcow2-util-linux-0e75337c31c9e3a963aecd440c8698994464324c.tar.gz
kernel-qcow2-util-linux-0e75337c31c9e3a963aecd440c8698994464324c.tar.xz
kernel-qcow2-util-linux-0e75337c31c9e3a963aecd440c8698994464324c.zip
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 <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/blkdev.h')
-rw-r--r--include/blkdev.h3
1 files changed, 3 insertions, 0 deletions
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 */