diff options
author | Karel Zak | 2010-02-15 13:29:04 +0100 |
---|---|---|
committer | Karel Zak | 2010-02-15 14:43:33 +0100 |
commit | e57fb0dec057be41530dc51436f470a5310ea9c9 (patch) | |
tree | 28e140df45a260e65c49366674ecc8551f53e7e4 | |
parent | fdisk: cleanup help, add -h option (diff) | |
download | kernel-qcow2-util-linux-e57fb0dec057be41530dc51436f470a5310ea9c9.tar.gz kernel-qcow2-util-linux-e57fb0dec057be41530dc51436f470a5310ea9c9.tar.xz kernel-qcow2-util-linux-e57fb0dec057be41530dc51436f470a5310ea9c9.zip |
fdisk: fallback for topology values
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | fdisk/fdisk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 0a402bb4d..655bf0c6b 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -990,8 +990,12 @@ get_topology(int fd) { else if (blkdev_get_sector_size(fd, &arg) == 0) sector_size = arg; + if (!phy_sector_size) + phy_sector_size = sector_size; + if (!min_io_size) + min_io_size = phy_sector_size; if (!io_size) - io_size = sector_size; + io_size = min_io_size; if (sector_size != DEFAULT_SECTOR_SIZE) printf(_("Note: sector size is %d (not %d)\n"), |