More compile fixes
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
47d1109592
commit
78bb9b4703
@ -61,3 +61,36 @@
|
|||||||
} while (rv2!=2);
|
} while (rv2!=2);
|
||||||
/* Incase there are stacked devices, we need to go around again */
|
/* Incase there are stacked devices, we need to go around again */
|
||||||
} while (acnt);
|
} while (acnt);
|
||||||
|
--- mdadm-3.1.5/super1.c.param 2011-03-26 13:51:30.166019581 -0400
|
||||||
|
+++ mdadm-3.1.5/super1.c 2011-03-26 13:55:02.995382097 -0400
|
||||||
|
@@ -111,7 +111,6 @@ static unsigned int calc_sb_1_csum(struc
|
||||||
|
unsigned long long newcsum;
|
||||||
|
int size = sizeof(*sb) + __le32_to_cpu(sb->max_dev)*2;
|
||||||
|
unsigned int *isuper = (unsigned int*)sb;
|
||||||
|
- int i;
|
||||||
|
|
||||||
|
/* make sure I can count... */
|
||||||
|
if (offsetof(struct mdp_superblock_1,data_offset) != 128 ||
|
||||||
|
@@ -123,7 +122,7 @@ static unsigned int calc_sb_1_csum(struc
|
||||||
|
disk_csum = sb->sb_csum;
|
||||||
|
sb->sb_csum = 0;
|
||||||
|
newcsum = 0;
|
||||||
|
- for (i=0; size>=4; size -= 4 ) {
|
||||||
|
+ for (; size>=4; size -= 4 ) {
|
||||||
|
newcsum += __le32_to_cpu(*isuper);
|
||||||
|
isuper++;
|
||||||
|
}
|
||||||
|
@@ -387,13 +386,10 @@ static void examine_super1(struct supert
|
||||||
|
printf(" Array State : ");
|
||||||
|
for (d=0; d<__le32_to_cpu(sb->raid_disks) + delta_extra; d++) {
|
||||||
|
int cnt = 0;
|
||||||
|
- int me = 0;
|
||||||
|
unsigned int i;
|
||||||
|
for (i=0; i< __le32_to_cpu(sb->max_dev); i++) {
|
||||||
|
unsigned int role = __le16_to_cpu(sb->dev_roles[i]);
|
||||||
|
if (role == d) {
|
||||||
|
- if (i == __le32_to_cpu(sb->dev_number))
|
||||||
|
- me = 1;
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user