summaryrefslogtreecommitdiff
path: root/os/port
diff options
context:
space:
mode:
Diffstat (limited to 'os/port')
-rw-r--r--os/port/devprof.c4
-rw-r--r--os/port/error.h3
-rw-r--r--os/port/exportfs.c7
-rw-r--r--os/port/inferno.c3
-rw-r--r--os/port/portmkfile3
5 files changed, 11 insertions, 9 deletions
diff --git a/os/port/devprof.c b/os/port/devprof.c
index f0ee3ba8..d9603b6e 100644
--- a/os/port/devprof.c
+++ b/os/port/devprof.c
@@ -640,7 +640,7 @@ memprof(int c, Heap *h, ulong n)
i = p-r->base;
k = (r->id<<24) | i;
if(c == 0){
- h->pad = k;
+ h->hprof = k;
k = sizeof(Heap);
}
else{
@@ -657,7 +657,7 @@ memprof(int c, Heap *h, ulong n)
if(c == 3)
k = *(ulong*)h;
else
- k = h->pad;
+ k = h->hprof;
if((r = getrec(k>>24)) == nil){
unlock(&profile.l);
return;
diff --git a/os/port/error.h b/os/port/error.h
index 5d5c2f66..88492770 100644
--- a/os/port/error.h
+++ b/os/port/error.h
@@ -30,9 +30,6 @@ extern char Ehungup[]; /* i/o on hungup channel */
extern char Ebadctl[]; /* bad process or channel control request */
extern char Enodev[]; /* no free devices */
extern char Enoenv[]; /* no free environment resources */
-extern char Emuxshutdown[]; /* mux server shut down */
-extern char Emuxbusy[]; /* all mux channels busy */
-extern char Emuxmsg[]; /* bad mux message format or mismatch */
extern char Ethread[]; /* thread exited */
extern char Estopped[]; /* thread must be stopped */
extern char Enochild[]; /* no living children */
diff --git a/os/port/exportfs.c b/os/port/exportfs.c
index 354574ef..c8755fa8 100644
--- a/os/port/exportfs.c
+++ b/os/port/exportfs.c
@@ -511,6 +511,7 @@ exslave(void*)
Export *fs;
Exq *q, *t, *fq, **last;
char *err;
+ int nstat;
for(;;){
qlock(&exq.qwait);
@@ -569,7 +570,11 @@ exslave(void*)
break;
case Tstat:
q->out.stat = q->buf + MSGHDRSZ + BIT16SZ; /* leaves it just where we want it */
- q->out.nstat = q->bsize-(MSGHDRSZ+BIT16SZ);
+ nstat = q->bsize;
+ if(nstat > STATMAX)
+ nstat = STATMAX;
+ nstat -= MSGHDRSZ+BIT16SZ;
+ q->out.nstat = nstat;
break;
}
err = (*fcalls[q->in.type])(fs, &q->in, &q->out);
diff --git a/os/port/inferno.c b/os/port/inferno.c
index de9ea600..82de83d6 100644
--- a/os/port/inferno.c
+++ b/os/port/inferno.c
@@ -586,6 +586,7 @@ Sys_dial(void *fp)
return;
f->ret->t1.dfd = mkfd(f->ret->t0);
+ f->ret->t0 = 0;
f->ret->t1.cfd = mkfd(cfd);
retstr(dir, &f->ret->t1.dir);
}
@@ -609,6 +610,7 @@ Sys_announce(void *fp)
return;
f->ret->t1.cfd = mkfd(f->ret->t0);
+ f->ret->t0 = 0;
retstr(dir, &f->ret->t1.dir);
}
@@ -632,6 +634,7 @@ Sys_listen(void *fp)
return;
f->ret->t1.cfd = mkfd(f->ret->t0);
+ f->ret->t0 = 0;
retstr(dir, &f->ret->t1.dir);
}
diff --git a/os/port/portmkfile b/os/port/portmkfile
index 9ee9a7f7..111cc81f 100644
--- a/os/port/portmkfile
+++ b/os/port/portmkfile
@@ -20,9 +20,6 @@ CLEANEXTRA=
%.$O: ../ip/%.c
$CC $CFLAGS -I. ../ip/$stem.c
-%.$O: ../kfs/%.c
- $CC $CFLAGS -I. ../kfs/$stem.c
-
&.$O: $HFILES $PORTHFILES
$INSTALLDIR/%: %