util-linux/util-linux-2.13-sfdisk-geo.patch
kzak 7dd321303c - fix #245578 - login's PAM configuration inits the keyring at an
inconvenient time
- fix #231532 - "pamconsole" not documented in mount(8)
- fix #243930 - translation files exist, but are not being used
- fix #228731 - sfdisk doesn't support DM-MP device (add default heads and
    sectors)
- fix #231192 - ipcs is not printing correct values on pLinux
- fix #245912 - mount doesn't write the 'loop=...' option in /etc/mtab when
    mounting a loop device
- fix #213253 - "cal -3" generates improperly formatted output
2007-07-10 09:55:56 +00:00

13 lines
565 B
Diff

--- util-linux-2.13-pre7/fdisk/sfdisk.c.kzak 2007-06-25 09:13:31.000000000 +0200
+++ util-linux-2.13-pre7/fdisk/sfdisk.c 2007-06-25 09:12:42.000000000 +0200
@@ -469,8 +469,8 @@
R = get_geometry(dev, fd, silent);
- B.heads = (U.heads ? U.heads : R.heads);
- B.sectors = (U.sectors ? U.sectors : R.sectors);
+ B.heads = (U.heads ? U.heads : (R.heads ? R.heads : 255));
+ B.sectors = (U.sectors ? U.sectors : (R.sectors ? R.sectors : 63));
B.cylinders = (U.cylinders ? U.cylinders : R.cylinders);
B.cylindersize = B.heads * B.sectors;