#0 recount_geometry at libfdisk/src/alignment.c:143
#1 fdisk_discover_geometry at libfdisk/src/alignment.c:205
#2 fdisk_context_assign_device at libfdisk/src/context.c:173
#3 print_partition_table_from_option at fdisks/fdisk.c:924
References: https://bugzilla.redhat.com/show_bug.cgi?id=
1005566
Signed-off-by: Karel Zak <kzak@redhat.com>
/* what the kernel/bios thinks the geometry is */
blkdev_get_geometry(cxt->dev_fd, &h, &s);
- if (!h && !s) {
- /* unable to discover geometry, use default values */
- s = 63;
+
+ /* defaults */
+ if (!h)
h = 255;
- }
+ if (!s)
+ s = 63;
/* obtained heads and sectors */
cxt->geom.heads = h;