Version 2.02.21 -
===================================
+ Fix md signature check to handle both endiannesses.
Version 2.02.20 - 25th January 2007
===================================
sb_offset = MD_NEW_SIZE_SECTORS(size) << SECTOR_SHIFT;
/* Check if it is an md component device. */
+ /* Version 1 is little endian; version 0.90.0 is machine endian */
if (dev_read(dev, sb_offset, sizeof(uint32_t), &md_magic) &&
- (md_magic == xlate32(MD_SB_MAGIC))) {
+ ((md_magic == xlate32(MD_SB_MAGIC)) ||
+ (md_magic == MD_SB_MAGIC))) {
if (sb)
*sb = sb_offset;
ret = 1;