diff options
author | Samuel Thibault | 2008-07-24 00:46:05 +0200 |
---|---|---|
committer | Karel Zak | 2008-07-24 00:52:52 +0200 |
commit | 6b0054a2c6dddb43155220cac13848df98d74423 (patch) | |
tree | 27208ec3336d4785d6fcb8b068e9657b96556a6b /fdisk/fdisksgilabel.c | |
parent | lib: blkdev.c clean up, non-linux support (diff) | |
download | kernel-qcow2-util-linux-6b0054a2c6dddb43155220cac13848df98d74423.tar.gz kernel-qcow2-util-linux-6b0054a2c6dddb43155220cac13848df98d74423.tar.xz kernel-qcow2-util-linux-6b0054a2c6dddb43155220cac13848df98d74423.zip |
fdisk: non-linux support (BLK* and HDIO_*)
BLK* and HDIO_* are not available on all platform. Work around this
in a few places.
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/fdisksgilabel.c')
-rw-r--r-- | fdisk/fdisksgilabel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c index 14b2d6102..9f87751d3 100644 --- a/fdisk/fdisksgilabel.c +++ b/fdisk/fdisksgilabel.c @@ -713,6 +713,7 @@ create_sgilabel(void) res = blkdev_get_sectors(fd, &llsectors); +#ifdef HDIO_GETGEO if (!ioctl(fd, HDIO_GETGEO, &geometry)) { heads = geometry.heads; sectors = geometry.sectors; @@ -733,6 +734,7 @@ create_sgilabel(void) " > 33.8 GB.\n"), disk_device, cylinders); } } +#endif for (i = 0; i < 4; i++) { old[i].sysid = 0; if (valid_part_table_flag(MBRbuffer)) { |