diff options
author | BurnZeZ <devnull@localhost> | 2019-04-15 19:48:03 +0000 |
---|---|---|
committer | BurnZeZ <devnull@localhost> | 2019-04-15 19:48:03 +0000 |
commit | 75ee3b3081edab418e443d499ec28ceda9121e93 (patch) | |
tree | c6a954bf217039afc378399dee508fa9ba7a9399 /sys/src/9/port/devsd.c | |
parent | 82438139d670b2e8ca54480b888b3a904994e274 (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.c | 2 |
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++; |