summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-03-24 09:07:02 +1100
committerNeilBrown <neilb@suse.de>2010-03-24 09:07:02 +1100
commit86983cce34645efb2b270a737d573e01eeee96e5 (patch)
tree4e40e1871dd41d67a80a17d020a34732d8153f58
parenta31c140f13dfaac33d4f3ff0960cfe1c24fbe304 (diff)
downloadmdadm-86983cce34645efb2b270a737d573e01eeee96e5.tar.gz
mdadm-86983cce34645efb2b270a737d573e01eeee96e5.tar.xz
mdadm-86983cce34645efb2b270a737d573e01eeee96e5.zip
-rw-r--r--util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util.c b/util.c
index d292a66..79d2b0f 100644
--- a/util.c
+++ b/util.c
@@ -425,7 +425,12 @@ char *__fname_from_uuid(int id[4], int swap, char *buf, char sep)
char *fname_from_uuid(struct supertype *st, struct mdinfo *info, char *buf, char sep)
{
- return __fname_from_uuid(info->uuid, st->ss->swapuuid, buf, sep);
+ // dirty hack to work around an issue with super1 superblocks...
+ // super1 superblocks need swapuuid set in order for assembly to
+ // work, but can't have it set if we want this printout to match
+ // all the other uuid printouts in super1.c, so we force swapuuid
+ // to 1 to make our printout match the rest of super1
+ return __fname_from_uuid(info->uuid, (st->ss == &super1) ? 1 : st->ss->swapuuid, buf, sep);
}
#ifndef MDASSEMBLE