super1 - fix for bigendian machines.
devflags is a single byte so endian conversions are now wanted. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
887162637f
commit
adbb382b55
4
super1.c
4
super1.c
|
@ -1064,9 +1064,9 @@ static int write_init_super1(struct supertype *st)
|
|||
|
||||
sb->dev_number = __cpu_to_le32(di->disk.number);
|
||||
if (di->disk.state & (1<<MD_DISK_WRITEMOSTLY))
|
||||
sb->devflags |= __cpu_to_le32(WriteMostly1);
|
||||
sb->devflags |= WriteMostly1;
|
||||
else
|
||||
sb->devflags &= ~(__cpu_to_le32(WriteMostly1));
|
||||
sb->devflags &= ~WriteMostly1;
|
||||
|
||||
if ((rfd = open("/dev/urandom", O_RDONLY)) < 0 ||
|
||||
read(rfd, sb->device_uuid, 16) != 16) {
|
||||
|
|
Loading…
Reference in New Issue