summaryrefslogtreecommitdiff
path: root/super-mbr.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2017-05-12 12:32:07 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2017-05-12 12:32:07 +0100
commit77b19ed5f259bc62680acf2b1a3454baa2472bc5 (patch)
tree7441d8d057c09e54c8ea23c984f2ccdf22c98649 /super-mbr.c
parentca114f3c76374493f0fd64f8ea0a9b96ae9b1dc5 (diff)
New upstream release.
Diffstat (limited to 'super-mbr.c')
-rw-r--r--super-mbr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/super-mbr.c b/super-mbr.c
index 62b3f031..f5e4ceab 100644
--- a/super-mbr.c
+++ b/super-mbr.c
@@ -57,6 +57,11 @@ static void examine_mbr(struct supertype *st, char *homehost)
printf(" MBR Magic : %04x\n", sb->magic);
for (i = 0; i < MBR_PARTITIONS; i++)
+ /*
+ * Have to make every access through sb rather than using a
+ * pointer to the partition table (or an entry), since the
+ * entries are not properly aligned.
+ */
if (sb->parts[i].blocks_num)
printf("Partition[%d] : %12lu sectors at %12lu (type %02x)\n",
i,
@@ -151,6 +156,11 @@ static void getinfo_mbr(struct supertype *st, struct mdinfo *info, char *map)
info->component_size = 0;
for (i = 0; i < MBR_PARTITIONS ; i++)
+ /*
+ * Have to make every access through sb rather than using a
+ * pointer to the partition table (or an entry), since the
+ * entries are not properly aligned.
+ */
if (sb->parts[i].blocks_num) {
unsigned long last =
(unsigned long)__le32_to_cpu(sb->parts[i].blocks_num)