forked from pool/parted
27 lines
892 B
Diff
27 lines
892 B
Diff
Index: parted/parted.c
|
|
===================================================================
|
|
--- parted/parted.c.orig 2009-07-29 14:41:35.000000000 +0200
|
|
+++ parted/parted.c 2009-07-29 14:41:59.000000000 +0200
|
|
@@ -1312,7 +1312,21 @@ do_print (PedDevice** dev)
|
|
|
|
disk = ped_disk_new (*dev);
|
|
if (!disk)
|
|
+ {
|
|
+ if (ped_unit_get_default () == PED_UNIT_CHS ||
|
|
+ ped_unit_get_default () == PED_UNIT_CYLINDER)
|
|
+ {
|
|
+ PedCHSGeometry* chs = &(*dev)->bios_geom;
|
|
+ char* cyl_size = ped_unit_format_custom (*dev,
|
|
+ chs->heads * chs->sectors,
|
|
+ PED_UNIT_KILOBYTE);
|
|
+ printf (_("BIOS cylinder,head,sector geometry: %d,%d,%d. "
|
|
+ "Each cylinder is %s.\n"),
|
|
+ chs->cylinders, chs->heads, chs->sectors, cyl_size);
|
|
+ free (cyl_size);
|
|
+ }
|
|
goto error;
|
|
+ }
|
|
|
|
peek_word = command_line_peek_word ();
|
|
if (peek_word) {
|