From 5b660791b4afb9b24b13cbf4877ea62e4e832537 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 15 Feb 2011 10:45:01 +1100 Subject: Fix regression with removing 'failed' and 'detached' devices. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a request to remove all 'failed' or 'detached' devices chooses to remove the first device, it will not actually try the removal and will skip any following devices. This fixes it. Reported-by: Rémi Rérolle Tested-by: Rémi Rérolle Signed-off-by: NeilBrown --- Manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Manage.c') diff --git a/Manage.c b/Manage.c index 481c165..8c86a53 100644 --- a/Manage.c +++ b/Manage.c @@ -421,7 +421,7 @@ int Manage_subdevs(char *devname, int fd, dnprintable = dvname; break; } - if (jnext == 0) + if (next != dv) continue; } else if (strcmp(dv->devname, "detached") == 0) { if (dv->disposition != 'r' && dv->disposition != 'f') { @@ -461,7 +461,7 @@ int Manage_subdevs(char *devname, int fd, dnprintable = dvname; break; } - if (jnext == 0) + if (next != dv) continue; } else if (strcmp(dv->devname, "missing") == 0) { if (dv->disposition != 'a' || dv->re_add == 0) { -- cgit v1.2.1