From: Alasdair Kergon Date: Sat, 27 Nov 2004 21:37:54 +0000 (+0000) Subject: Endian fix to signature detection. X-Git-Tag: v2_02_91~5045 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=bbdab3fc9e38faf5dc4b7e61c3edf91cd28dce7a;p=lvm2.git Endian fix to signature detection. --- diff --git a/WHATS_NEW b/WHATS_NEW index 9b562793b..718cfde35 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,6 +1,6 @@ -Version 2.00.28 - 26th November 2004 +Version 2.00.28 - 27th November 2004 ==================================== - Fix partition table signature detection. + Fix partition table & md signature detection. Minor configure/makefile tidy. Export version.h from tools for clvmd. diff --git a/lib/device/dev-md.c b/lib/device/dev-md.c index b10949904..775e84ffd 100644 --- a/lib/device/dev-md.c +++ b/lib/device/dev-md.c @@ -53,7 +53,7 @@ int dev_is_md(struct device *dev, uint64_t *sb) /* Check if it is an md component device. */ if (dev_read(dev, sb_offset, sizeof(uint32_t), &md_magic) && - (md_magic == MD_SB_MAGIC)) { + (md_magic == xlate32(MD_SB_MAGIC))) { if (sb) *sb = sb_offset; ret = 1; diff --git a/lib/device/device.c b/lib/device/device.c index 9879510b9..2671a0bd6 100644 --- a/lib/device/device.c +++ b/lib/device/device.c @@ -43,7 +43,7 @@ static int _has_partition_table(struct device *dev) } if (dev_read(dev, PART_OFFSET, sizeof(part_magic), &part_magic) && - (part_magic == PART_MAGIC)) + (part_magic == xlate16(PART_MAGIC))) ret = 1; if (!dev_close(dev))