summaryrefslogtreecommitdiffstats
path: root/fdisks/gpt.c
diff options
context:
space:
mode:
authorKarel Zak2012-12-04 15:45:25 +0100
committerKarel Zak2012-12-04 15:45:25 +0100
commit413df906111c46bd71026c8501734c8ef32cfb87 (patch)
treeaf305da6d726c560e653e97790dfeaa20d677e4c /fdisks/gpt.c
parentfdisk: report PT type, inform about new GPT (diff)
downloadkernel-qcow2-util-linux-413df906111c46bd71026c8501734c8ef32cfb87.tar.gz
kernel-qcow2-util-linux-413df906111c46bd71026c8501734c8ef32cfb87.tar.xz
kernel-qcow2-util-linux-413df906111c46bd71026c8501734c8ef32cfb87.zip
fdisk: (gpt) check partitions alignment
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/gpt.c')
-rw-r--r--fdisks/gpt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fdisks/gpt.c b/fdisks/gpt.c
index 9c9a2ac8d..c0ca5e08a 100644
--- a/fdisks/gpt.c
+++ b/fdisks/gpt.c
@@ -1119,14 +1119,16 @@ void gpt_list_table(struct fdisk_context *cxt,
t = fdisk_get_partition_type(cxt, i);
- printf("%2d %12ld %12ld %6s %-15.15s %s\n",
+ printf("%2d %12ju %12ju %6s %-15.15s %s\n",
i+1,
- ents[i].lba_start,
- ents[i].lba_end,
+ start,
+ le64_to_cpu(ents[i].lba_end),
sizestr,
t->name,
name);
+ check_alignment(cxt, start, i);
+
free(name);
free(sizestr);
fdisk_free_parttype(t);