From 972b3f3056610a925fadb5bf45bea269b990eb58 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 17 Jan 2009 11:57:32 +0000 Subject: [PATCH] Bail on ENXIO, you won't get any further any way. Submitted by: tobez --- sbin/recoverdisk/recoverdisk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 0dc5d7ccf0d7..63536354dfe9 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -276,7 +276,10 @@ main(int argc, char * const argv[]) lp->len -= i; continue; } - printf("\n%jd %zu failed %d\n", lp->start, i, errno); + printf("\n%jd %zu failed (%s)\n", + lp->start, i, strerror(errno)); + if (errno == ENXIO) + aborting = 1; new_lump(lp->start, i, lp->state + 1); lp->start += i; lp->len -= i;