summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/dos.c
diff options
context:
space:
mode:
authorAndreas Henriksson2016-02-25 11:26:53 +0100
committerKarel Zak2016-03-07 15:08:50 +0100
commita2ad58ac51703da20c3f368da585eb426e53c29e (patch)
treece1fa39fb052a0484b8d8bfaad5cd177b3d57b05 /libfdisk/src/dos.c
parentMerge branch 'port-osx' of https://github.com/rudimeier/util-linux (diff)
downloadkernel-qcow2-util-linux-a2ad58ac51703da20c3f368da585eb426e53c29e.tar.gz
kernel-qcow2-util-linux-a2ad58ac51703da20c3f368da585eb426e53c29e.tar.xz
kernel-qcow2-util-linux-a2ad58ac51703da20c3f368da585eb426e53c29e.zip
libfdisk: Fix order of C/H/S numbers output
While the header says C/H/S the actual numbers where printed as C/S/H. Addresses: http://bugs.debian.org/815847 Reported-by: "groups, freeman" <freeman_groups@reason.dyndns.org> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Diffstat (limited to 'libfdisk/src/dos.c')
-rw-r--r--libfdisk/src/dos.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
index 2f3a37bcb..b1992258b 100644
--- a/libfdisk/src/dos.c
+++ b/libfdisk/src/dos.c
@@ -1903,15 +1903,15 @@ static int dos_get_partition(struct fdisk_context *cxt, size_t n,
/* start C/H/S */
if (asprintf(&pa->start_chs, "%d/%d/%d",
cylinder(p->bs, p->bc),
- sector(p->bs),
- p->bh) < 0)
+ p->bh,
+ sector(p->bs)) < 0)
return -ENOMEM;
/* end C/H/S */
if (asprintf(&pa->end_chs, "%d/%d/%d",
cylinder(p->es, p->ec),
- sector(p->es),
- p->eh) < 0)
+ p->eh,
+ sector(p->es)) < 0)
return -ENOMEM;
return 0;