Merge branch 'master' into scratch-3.0
Conflicts: Assemble.c config.c
This commit is contained in:
commit
78fbcc1031
|
@ -626,7 +626,7 @@ int Wait(char *dev)
|
|||
free_mdstat(ms);
|
||||
return rv;
|
||||
}
|
||||
free(ms);
|
||||
free_mdstat(ms);
|
||||
rv = 0;
|
||||
mdstat_wait(5);
|
||||
}
|
||||
|
|
2
config.c
2
config.c
|
@ -600,7 +600,7 @@ void mailfromline(char *line)
|
|||
else {
|
||||
char *t = NULL;
|
||||
|
||||
if (asprintf(&t, "%s %s", alert_mail_from, w) > 0) {
|
||||
if (xasprintf(&t, "%s %s", alert_mail_from, w) > 0) {
|
||||
free(alert_mail_from);
|
||||
alert_mail_from = t;
|
||||
}
|
||||
|
|
|
@ -337,4 +337,5 @@ void RebuildMap(void)
|
|||
sysfs_uevent(sra, "change");
|
||||
sysfs_free(sra);
|
||||
}
|
||||
free_mdstat(mdstat);
|
||||
}
|
||||
|
|
2
mdadm.c
2
mdadm.c
|
@ -1241,6 +1241,7 @@ int main(int argc, char *argv[])
|
|||
rv |= WaitClean(name, v);
|
||||
put_md_name(name);
|
||||
}
|
||||
free_mdstat(ms);
|
||||
} else if (devmode == 'S' && scan) {
|
||||
/* apply --stop to all devices in /proc/mdstat */
|
||||
/* Due to possible stacking of devices, repeat until
|
||||
|
@ -1273,6 +1274,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
put_md_name(name);
|
||||
}
|
||||
free_mdstat(ms);
|
||||
} while (!last && err);
|
||||
if (err) rv |= 1;
|
||||
} else {
|
||||
|
|
11
mdadm.h
11
mdadm.h
|
@ -880,6 +880,17 @@ static inline int is_subarray(char *vers)
|
|||
#define dprintf(fmt, arg...) \
|
||||
({ if (0) fprintf(stderr, fmt, ##arg); 0; })
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
static inline int xasprintf(char **strp, const char *fmt, ...) {
|
||||
va_list ap;
|
||||
int ret;
|
||||
va_start(ap, fmt);
|
||||
ret = asprintf(strp, fmt, ap);
|
||||
va_end(ap);
|
||||
assert(ret >= 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define LEVEL_MULTIPATH (-4)
|
||||
#define LEVEL_LINEAR (-1)
|
||||
|
|
Loading…
Reference in New Issue