re-add error check

This commit is contained in:
NeilBrown 2009-05-05 21:13:29 +10:00
parent caa0f6c623
commit c9f39c1b9b
1 changed files with 5 additions and 0 deletions

View File

@ -422,6 +422,11 @@ int Manage_subdevs(char *devname, int fd,
fprintf(stderr, Name ": re-added %s\n", dv->devname);
continue;
}
if (errno == ENOMEM || errno == EROFS) {
fprintf(stderr, Name ": add new device failed for %s: %s\n",
dv->devname, strerror(errno));
return 1;
}
/* fall back on normal-add */
}
}