git: 9front

Download patch

ref: 27001aa6d8b254e52f3476c9511470f4589aac5e
parent: 90f2dfc7b164cf7a46330ea66d8ee674d1a210d4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Apr 16 12:25:33 EDT 2019

devsd: fix sddelpart() AGAIN

the previous "fix" missed to advance pp so after
we hit a invalid partition all following partitions
would be ignored.

--- a/sys/src/9/port/devsd.c
+++ b/sys/src/9/port/devsd.c
@@ -154,9 +154,7 @@
 	 */
 	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++;
 	}
--