From 143544de46fc45a05ff738be8fd08edb6b1ed620 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 14 Jul 1992 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1992-07-14 --- gnot/trap.c | 2 +- pc/trap.c | 2 +- port/devlance.c | 3 +++ port/devpipe.c | 2 +- port/sysproc.c | 1 + power/trap.c | 2 +- ss/trap.c | 2 +- 7 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gnot/trap.c b/gnot/trap.c index 2ceb895d4260dce01f3b407990c028f018a57117..2a709ce88c94ab0b2e7bc7e25f38177676600b69 100644 --- a/gnot/trap.c +++ b/gnot/trap.c @@ -178,7 +178,7 @@ notify(Ureg *ur) sprint(n->msg+l, " pc=0x%.8lux", ur->pc); } if(n->flag!=NUser && (u->notified || u->notify==0)){ - if(u->note[0].flag == NDebug) + if(n->flag == NDebug) pprint("suicide: %s\n", n->msg); Die: qunlock(&u->p->debug); diff --git a/pc/trap.c b/pc/trap.c index 92911f7012860eddae6aebca36bdf9397f4f58d2..6caa14859e7be8b321960162c12e5950e1bf2f9f 100644 --- a/pc/trap.c +++ b/pc/trap.c @@ -391,7 +391,7 @@ notify(Ureg *ur) sprint(n->msg+l, " pc=0x%.8lux", ur->pc); } if(n->flag!=NUser && (u->notified || u->notify==0)){ - if(u->note[0].flag == NDebug) + if(n->flag == NDebug) pprint("suicide: %s\n", n->msg); Die: qunlock(&u->p->debug); diff --git a/port/devlance.c b/port/devlance.c index ffc4a0f2d14bade6139e6cf1cdebc25859f0ce3e..07df4afe04667eb095e7d47184d278312e69e958 100644 --- a/port/devlance.c +++ b/port/devlance.c @@ -741,6 +741,9 @@ lanceup(Etherpkt *p, int len) Ethertype *e; int t; + if(len <= 0) + return; + t = (p->type[0]<<8) | p->type[1]; for(e = &l.e[0]; e < &l.e[Ntypes]; e++){ /* diff --git a/port/devpipe.c b/port/devpipe.c index 36ae10521a4d000a05b6409dddcd622b29620ecf..a82ddd8dd71a8887a0e90bb36afa947c3fb7f26c 100644 --- a/port/devpipe.c +++ b/port/devpipe.c @@ -255,7 +255,7 @@ pipewrite(Chan *c, void *va, long n, ulong offset) { USED(offset); if(waserror()) { - postnote(u->p, 1, "sys: write on closed pipe", NExit); + postnote(u->p, 1, "sys: write on closed pipe", NUser); error(Egreg); } n = streamwrite(c, va, n, 0); diff --git a/port/sysproc.c b/port/sysproc.c index 988d352703bffb6f776d78b53ee3bb4a966e90b0..d6ccadd1a839354589397fbad5b2c31f70cde285 100644 --- a/port/sysproc.c +++ b/port/sysproc.c @@ -12,6 +12,7 @@ int shargs(char*, int, char**); long sysr1(ulong *arg) { + xsummary(); print("[%s %s %d] r1 = %d\n", u->p->user, u->p->text, u->p->pid, arg[0]); return 0; } diff --git a/power/trap.c b/power/trap.c index 6c6841334cacedaabd3d0b34ae60012da52c80c6..4aba77823bb1ea5949fa5cceb9f208ce7479d4ba 100644 --- a/power/trap.c +++ b/power/trap.c @@ -396,7 +396,7 @@ notify(Ureg *ur) sprint(n->msg+l, " pc=0x%.8lux", ur->pc); } if(n->flag!=NUser && (u->notified || u->notify==0)){ - if(u->note[0].flag == NDebug) + if(n->flag == NDebug) pprint("suicide: %s\n", n->msg); Die: qunlock(&u->p->debug); diff --git a/ss/trap.c b/ss/trap.c index 41e6f8c30bb77d46c271dc34c52ebd3f03a98dc1..5045a33ebe1a5db799064a20dce74a6792efe3b5 100644 --- a/ss/trap.c +++ b/ss/trap.c @@ -249,7 +249,7 @@ notify(Ureg *ur) sprint(n->msg+l, " pc=0x%.8lux", ur->pc); } if(n->flag!=NUser && (u->notified || u->notify==0)){ - if(u->note[0].flag == NDebug) + if(n->flag == NDebug) pprint("suicide: %s\n", n->msg); Die: qunlock(&u->p->debug);