1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Endian fix to signature detection.

This commit is contained in:
Alasdair Kergon 2004-11-27 21:37:54 +00:00
parent a266258f4c
commit bbdab3fc9e
3 changed files with 4 additions and 4 deletions

View File

@ -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. Minor configure/makefile tidy.
Export version.h from tools for clvmd. Export version.h from tools for clvmd.

View File

@ -53,7 +53,7 @@ int dev_is_md(struct device *dev, uint64_t *sb)
/* Check if it is an md component device. */ /* Check if it is an md component device. */
if (dev_read(dev, sb_offset, sizeof(uint32_t), &md_magic) && if (dev_read(dev, sb_offset, sizeof(uint32_t), &md_magic) &&
(md_magic == MD_SB_MAGIC)) { (md_magic == xlate32(MD_SB_MAGIC))) {
if (sb) if (sb)
*sb = sb_offset; *sb = sb_offset;
ret = 1; ret = 1;

View File

@ -43,7 +43,7 @@ static int _has_partition_table(struct device *dev)
} }
if (dev_read(dev, PART_OFFSET, sizeof(part_magic), &part_magic) && if (dev_read(dev, PART_OFFSET, sizeof(part_magic), &part_magic) &&
(part_magic == PART_MAGIC)) (part_magic == xlate16(PART_MAGIC)))
ret = 1; ret = 1;
if (!dev_close(dev)) if (!dev_close(dev))