ref: 11628e90fb85137a3f02e4ad5c343c15a90846b5
parent: e652be5559a70aa339a3952889f0421b9dda5ceb
parent: 28f3a3aad8d2d73010f1c81080e92f71903f4556
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Mar 8 16:55:58 EDT 2020
merge
--- a/sys/src/9/boot/local.rc
+++ b/sys/src/9/boot/local.rc
@@ -45,7 +45,7 @@
}
fn bootfs{
- {$1 -s -f $*(2-) &} <[0=1] | echo 0 >/srv/boot
+ {$1 -s -f $*(2-) <[0=1] &} | echo 0 >/srv/boot
}
fn connectlocal{
--- a/sys/src/9/boot/nusbrc
+++ b/sys/src/9/boot/nusbrc
@@ -45,7 +45,7 @@
diskparts $dev
for(part in $dev/dos* $dev/9fat* $dev/data) if(test -r $part && ~ `{fstype $part} dos) {
mkdir -m 0700 '#σc/'^$dev || exit
- {dossrv -s -f $part &} <[0=1] |
+ {dossrv -s -f $part <[0=1] &} |
echo 0 >'#σc/'^$dev/dos
exit
}
--- a/sys/src/9/port/devshr.c
+++ b/sys/src/9/port/devshr.c
@@ -554,6 +554,7 @@
Sch *sch;
Mpt *mpt;
Mhead *h;
+ Chan *bc;
sch = tosch(c);
if(waserror()){
@@ -593,6 +594,7 @@
qunlock(&shrslk);
break;
case Qcmpt:
+ bc = nil;
mpt = sch->mpt;
m = &mpt->m;
h = &shr->umh;
@@ -601,10 +603,14 @@
if(*ml == m){
*ml = m->next;
m->next = nil;
+ bc = m->to;
+ m->to = nil;
putmpt(mpt);
break;
}
wunlock(&h->lock);
+ if(bc != nil)
+ cclose(bc);
break;
}
poperror();