summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devsd.c
diff options
context:
space:
mode:
authorBurnZeZ <devnull@localhost>2019-04-15 19:48:03 +0000
committerBurnZeZ <devnull@localhost>2019-04-15 19:48:03 +0000
commit75ee3b3081edab418e443d499ec28ceda9121e93 (patch)
treec6a954bf217039afc378399dee508fa9ba7a9399 /sys/src/9/port/devsd.c
parent82438139d670b2e8ca54480b888b3a904994e274 (diff)
devsd: fix panic when using "delpart" to remove a partition that was already removed
Diffstat (limited to 'sys/src/9/port/devsd.c')
-rw-r--r--sys/src/9/port/devsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/port/devsd.c b/sys/src/9/port/devsd.c
index 32d6f26a1..d21106f19 100644
--- a/sys/src/9/port/devsd.c
+++ b/sys/src/9/port/devsd.c
@@ -154,6 +154,8 @@ 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)
break;
pp++;