We can pull in more information from sysfs earlier, so move sra to the top.
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
* '1' if the array is degraded, or '0' if it is optimal (or dead).
*/
struct { int state, major, minor; } info[MAX_DISKS];
* '1' if the array is degraded, or '0' if it is optimal (or dead).
*/
struct { int state, major, minor; } info[MAX_DISKS];
mdu_array_info_t array;
struct mdstat_ent *mse = NULL, *mse2;
char *dev = st->devname;
mdu_array_info_t array;
struct mdstat_ent *mse = NULL, *mse2;
char *dev = st->devname;
* If there is a number in /mismatch_cnt,
* we should report that.
*/
* If there is a number in /mismatch_cnt,
* we should report that.
*/
- struct mdinfo *sra =
- sysfs_read(-1, st->devnm, GET_MISMATCH);
+ sra = sysfs_read(-1, st->devnm, GET_MISMATCH);
if (sra && sra->mismatch_cnt > 0) {
char cnt[80];
snprintf(cnt, sizeof(cnt),
if (sra && sra->mismatch_cnt > 0) {
char cnt[80];
snprintf(cnt, sizeof(cnt),