]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fdisk: API: add geometry
authorDavidlohr Bueso <dave@gnu.org>
Sun, 17 Jun 2012 16:10:33 +0000 (18:10 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Jun 2012 06:05:49 +0000 (08:05 +0200)
commit24cd580b70fa04c7374c4f5c5fa477fc06748211
tree46adb56e5eb9188a8be50131743169f2213c5759
parent6efb4b12567703f84a6c7305e21df734ca34b748
fdisk: API: add geometry

Add device geometry to the fdisk API. While it maintains traditional behaviour, the cylinders
are changed to sector_t instead of unsigned int in order to avoid dealing with truncated cylinders.
A new helper is added to compute the amount of cylinders based on the heads and sectors - if a user passed
-H or -S to the program, it must call this function to update the corresponding values.

This patch passes regression tests.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk/fdisk.c
fdisk/fdisk.h
fdisk/fdiskaixlabel.c
fdisk/fdiskbsdlabel.c
fdisk/fdiskdoslabel.c
fdisk/fdiskmaclabel.c
fdisk/fdisksgilabel.c
fdisk/fdisksunlabel.c
fdisk/utils.c