Lines 145-150
Link Here
|
145 |
{ |
145 |
{ |
146 |
struct mdp_superblock_1 *sb = sbv; |
146 |
struct mdp_superblock_1 *sb = sbv; |
147 |
int i; |
147 |
int i; |
|
|
148 |
unsigned long long sb_offset; |
148 |
char *nm; |
149 |
char *nm; |
149 |
char *c=map_num(pers, __le32_to_cpu(sb->level)); |
150 |
char *c=map_num(pers, __le32_to_cpu(sb->level)); |
150 |
|
151 |
|
Lines 156-164
Link Here
|
156 |
else |
157 |
else |
157 |
nm = "??"; |
158 |
nm = "??"; |
158 |
|
159 |
|
159 |
printf("ARRAY /dev/md%s level=%s metadata=1 num-devices=%d UUID=", |
160 |
printf("ARRAY /dev/md%s level=%s ", nm, c?c:"-unknown-"); |
160 |
nm, |
161 |
sb_offset = __le64_to_cpu(sb->super_offset); |
161 |
c?c:"-unknown-", __le32_to_cpu(sb->raid_disks)); |
162 |
if (sb_offset <= 4) |
|
|
163 |
printf("metadata=1.1 "); |
164 |
else if (sb_offset <= 8) |
165 |
printf("metadata=1.2 "); |
166 |
else |
167 |
printf("metadata=1.0 "); |
168 |
printf("num-devices=%d UUID=", __le32_to_cpu(sb->raid_disks)); |
162 |
for (i=0; i<16; i++) { |
169 |
for (i=0; i<16; i++) { |
163 |
if ((i&3)==0 && i != 0) printf(":"); |
170 |
if ((i&3)==0 && i != 0) printf(":"); |
164 |
printf("%02x", sb->set_uuid[i]); |
171 |
printf("%02x", sb->set_uuid[i]); |