summaryrefslogtreecommitdiffstats
path: root/super1.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-08-04 04:41:12 +0000
committerNeil Brown <neilb@suse.de>2005-08-04 04:41:12 +0000
commitf277ce367125882ea809f981172b8d5c0cc4d5c7 (patch)
tree9694dfe2d09a972eb38c0d33d8ba6a5153ccb2f6 /super1.c
parent11018a4592680d0d9312c21bf7689bc8db55a609 (diff)
downloadmdadm-f277ce367125882ea809f981172b8d5c0cc4d5c7.tar.gz
mdadm-f277ce367125882ea809f981172b8d5c0cc4d5c7.tar.xz
mdadm-f277ce367125882ea809f981172b8d5c0cc4d5c7.zip
Assorted Fixes for multiple bugs.
Assemble would crash, or just not work. A few other problem found by a new test-suite. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/super1.c b/super1.c
index 6bd5cec..3c24f34 100644
--- a/super1.c
+++ b/super1.c
@@ -28,7 +28,7 @@
*/
#include "mdadm.h"
-
+#include <endian.h>
#include "asm/byteorder.h"
/*
* The version-1 superblock :
@@ -804,4 +804,9 @@ struct superswitch super1 = {
.match_metadata_desc = match_metadata_desc1,
.avail_size = avail_size1,
.major = 1,
+#if __BYTE_ORDER == BIG_ENDIAN
+ .swapuuid = 0,
+#else
+ .swapuuid = 1,
+#endif
};