From b44440bd165bdaa8c5764eead3fc54cadab7334f Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 16 Apr 2019 16:25:33 +0200 Subject: [PATCH] devsd: fix sddelpart() AGAIN the previous "fix" missed to advance pp so after we hit a invalid partition all following partitions would be ignored. --- sys/src/9/port/devsd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/src/9/port/devsd.c b/sys/src/9/port/devsd.c index d21106f19..09f885660 100644 --- a/sys/src/9/port/devsd.c +++ b/sys/src/9/port/devsd.c @@ -154,9 +154,7 @@ sddelpart(SDunit* unit, char* name) */ pp = unit->part; for(i = 0; i < unit->npart; i++){ - if(!pp->valid) - continue; - if(strcmp(name, pp->name) == 0) + if(pp->valid && strcmp(name, pp->name) == 0) break; pp++; }