changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: devsd: fix panic when using "delpart" to remove a partition that was already removed

changeset 7166: b1bd262dc055
parent 7165: 9d1880edcf64
child 7167: e4a7fe526ec5
author: BurnZeZ
date: Mon, 15 Apr 2019 19:48:03 +0000
files: sys/src/9/port/devsd.c
description: devsd: fix panic when using "delpart" to remove a partition that was already removed
     1.1--- a/sys/src/9/port/devsd.c
     1.2+++ b/sys/src/9/port/devsd.c
     1.3@@ -154,6 +154,8 @@ sddelpart(SDunit* unit, char* name)
     1.4 	 */
     1.5 	pp = unit->part;
     1.6 	for(i = 0; i < unit->npart; i++){
     1.7+		if(!pp->valid)
     1.8+			continue;
     1.9 		if(strcmp(name, pp->name) == 0)
    1.10 			break;
    1.11 		pp++;