if (homehost) {
int first = st->ss->match_home(st, homehost);
int last = tst->ss->match_home(tst, homehost);
- if (first+last == 1) {
+ if (first != last &&
+ (first == 1 || last == 1)) {
/* We can do something */
if (first) {/* just ignore this one */
if ((inargv && verbose >= 0) || verbose > 0)
/* 3a/ if not, check for homehost match. If no match, reject. */
if (!match) {
if (homehost == NULL ||
- st->ss->match_home(st, homehost) == 0) {
+ st->ss->match_home(st, homehost) != 1) {
if (verbose >= 0)
fprintf(stderr, Name
": not found in mdadm.conf and not identified by homehost.\n");
void (*getinfo_super)(struct supertype *st, struct mdinfo *info);
/* Check if the given metadata is flagged as belonging to "this"
- * host. For arrays that don't determine a minor-number, this
- * can always be true (??)
+ * host. 0 for 'no', 1 for 'yes', -1 for "Don't record homehost"
*/
int (*match_home)(struct supertype *st, char *homehost);
{
printf("%s\n", __FUNCTION__);
- return 0;
+ return -1;
}
static void uuid_from_super_imsm(struct supertype *st, int uuid[4])