diff options
author | Davidlohr Bueso | 2012-06-17 18:10:33 +0200 |
---|---|---|
committer | Karel Zak | 2012-06-21 08:05:49 +0200 |
commit | 24cd580b70fa04c7374c4f5c5fa477fc06748211 (patch) | |
tree | 46adb56e5eb9188a8be50131743169f2213c5759 /fdisk/fdiskaixlabel.c | |
parent | fdisk: mark dos compatibility/CHS options deprecated in manpage (diff) | |
download | kernel-qcow2-util-linux-24cd580b70fa04c7374c4f5c5fa477fc06748211.tar.gz kernel-qcow2-util-linux-24cd580b70fa04c7374c4f5c5fa477fc06748211.tar.xz kernel-qcow2-util-linux-24cd580b70fa04c7374c4f5c5fa477fc06748211.zip |
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>
Diffstat (limited to 'fdisk/fdiskaixlabel.c')
-rw-r--r-- | fdisk/fdiskaixlabel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fdisk/fdiskaixlabel.c b/fdisk/fdiskaixlabel.c index c15ab749b..fb36489e1 100644 --- a/fdisk/fdiskaixlabel.c +++ b/fdisk/fdiskaixlabel.c @@ -57,7 +57,7 @@ int check_aix_label(struct fdisk_context *cxt) return 0; } other_endian = (aixlabel->magic == AIX_LABEL_MAGIC_SWAPPED); - update_units(); + update_units(cxt); disklabel = AIX_LABEL; partitions= 1016; volumes = 15; |