Smaller process listing.
[rsc] --rw-rw-r-- M 129339 glenda sys 6399 Dec 12 07:24 sys/lib/acid/kernel
/n/sourcesdump/2005/1212/plan9/sys/lib/acid/kernel:169,175 -
/n/sourcesdump/2005/1213/plan9/sys/lib/acid/kernel:169,175
complex Proc p;
local s, i;
- if p.state != 0 then { // 0 is Dead
+ if p.state != 0 && p.pid != 0 && p.text != 0 then { // 0 is Dead
s = p.psstate;
if s == 0 then {
s = "kproc";
Useless or incorrect tests.
[rsc] --rw-rw-r-- M 129339 glenda sys 9496 Dec 12 07:21 sys/src/9/ip/icmp.c
/n/sourcesdump/2005/1212/plan9/sys/src/9/ip/icmp.c:369,375 -
/n/sourcesdump/2005/1213/plan9/sys/src/9/ip/icmp.c:369,375
ipoput4(icmp->f, r, 0, MAXTTL, DFLTTOS, nil);
break;
case Unreachable:
- if(p->code > 5 || p->code < 0)
+ if(p->code > 5)
msg = unreachcode[1];
else
msg = unreachcode[p->code];
[rsc] --rw-rw-r-- M 129339 presotto sys 18083 Dec 12 07:21 sys/src/9/ip/icmp6.c
/n/sourcesdump/2005/1212/plan9/sys/src/9/ip/icmp6.c:749,755 -
/n/sourcesdump/2005/1213/plan9/sys/src/9/ip/icmp6.c:749,755
break;
case UnreachableV6:
- if(p->code > 4 || p->code < 0)
+ if(p->code > 4)
msg = unreachcode[icmp6_unkn_code];
else
msg = unreachcode[p->code];
[rsc] --rw-rw-r-- M 129339 glenda sys 26923 Dec 12 07:21 sys/src/9/ip/il.c
/n/sourcesdump/2005/1212/plan9/sys/src/9/ip/il.c:563,569 -
/n/sourcesdump/2005/1213/plan9/sys/src/9/ip/il.c:563,569
v4tov6(laddr, ih->dst);
if((csum = ptclcsum(bp, IL_IPSIZE, illen)) != 0) {
- if(ih->iltype < 0 || ih->iltype > Ilclose)
+ if(ih->iltype > Ilclose)
st = "?";
else
st = iltype[ih->iltype];
/n/sourcesdump/2005/1212/plan9/sys/src/9/ip/il.c:586,592 -
/n/sourcesdump/2005/1213/plan9/sys/src/9/ip/il.c:586,592
if(ic->state == Illistening){
if(ih->iltype != Ilsync){
qunlock(il);
- if(ih->iltype < 0 || ih->iltype > Ilclose)
+ if(ih->iltype > Ilclose)
st = "?";
else
st = iltype[ih->iltype];
[rsc] --rw-rw-r-- M 129339 presotto sys 28760 Dec 12 07:22 sys/src/9/pc/etherga620.c
/n/sourcesdump/2005/1212/plan9/sys/src/9/pc/etherga620.c:1056,1062 -
/n/sourcesdump/2005/1213/plan9/sys/src/9/pc/etherga620.c:1056,1062
static int
ga620reset(Ctlr* ctlr)
{
- int cls, csr, i;
+ int cls, csr, i, r;
if(ga620detach(ctlr) < 0)
return -1;
/n/sourcesdump/2005/1212/plan9/sys/src/9/pc/etherga620.c:1095,1102 -
/n/sourcesdump/2005/1213/plan9/sys/src/9/pc/etherga620.c:1095,1103
* Snarf the MAC address from the serial EEPROM.
*/
for(i = 0; i < Eaddrlen; i++){
- if((ctlr->ea[i] = at24c32r(ctlr, 0x8E+i)) == -1)
+ if((r = at24c32r(ctlr, 0x8E+i)) == -1)
return -1;
+ ctlr->ea[i] = r;
}
/*
[jmk] --rw-rw-r-- M 129339 glenda sys 2494 Dec 12 13:16 sys/src/9/port/sd.h
/n/sourcesdump/2005/1212/plan9/sys/src/9/port/sd.h:25,31 -
/n/sourcesdump/2005/1213/plan9/sys/src/9/port/sd.h:25,31
struct SDunit {
SDev* dev;
int subno;
- uchar inquiry[256]; /* format follows SCSI spec */
+ uchar inquiry[255]; /* format follows SCSI spec */
uchar sense[18]; /* format follows SCSI spec */
SDperm;
Fix i81x cursor.
[rsc] --rw-rw-r-- M 129339 glenda sys 12036 Dec 12 07:20 sys/src/cmd/aux/vga/i81x.c
/n/sourcesdump/2005/1212/plan9/sys/src/cmd/aux/vga/i81x.c:314,319 -
/n/sourcesdump/2005/1213/plan9/sys/src/cmd/aux/vga/i81x.c:314,320
int i;
ulong *rp;
I81x *i81x;
+ char *p;
i81x = vga->private;
/n/sourcesdump/2005/1212/plan9/sys/src/cmd/aux/vga/i81x.c:337,342 -
/n/sourcesdump/2005/1213/plan9/sys/src/cmd/aux/vga/i81x.c:338,357
*rp++ = i81x->lcd[i];
/* set cursor, graphic mode */
rp = (ulong*)(i81x->mmio+0x70008);
+ *rp = i81x->pixconf | (1<<8);
+
+ p = (char*)(i81x->mmio+Pixmask); /* DACMASK */
+ *p = 0xff;
+ p = (char*)(i81x->mmio+PaddrW); /* DACWX */
+ *p = 0x04;
+ p = (char*)(i81x->mmio+Pdata); /* DACDATA */
+ *p = 0xff;
+ *p = 0xff;
+ *p = 0xff;
+ *p = 0x00;
+ *p = 0x00;
+ *p = 0x00;
+
*rp = i81x->pixconf;
ctlr->flag |= Fload;
Print to diagbuf so that prints stay together.
[rsc] --rw-rw-r-- M 129339 glenda sys 26837 Dec 12 07:21 sys/src/cmd/cc/dcl.c
/n/sourcesdump/2005/1212/plan9/sys/src/cmd/cc/dcl.c:1324,1331 -
/n/sourcesdump/2005/1213/plan9/sys/src/cmd/cc/dcl.c:1324,1331
if(s->type != T)
if(s->class != c || !sametype(t, s->type) || t->etype == TENUM) {
diag(Z, "external redeclaration of: %s", s->name);
- print(" %s %T %L\n", cnames[c], t, nearln);
- print(" %s %T %L\n", cnames[s->class], s->type, s->varlineno);
+ Bprint(&diagbuf, " %s %T %L\n", cnames[c], t, nearln);
+ Bprint(&diagbuf, " %s %T %L\n", cnames[s->class], s->type, s->varlineno);
}
tmerge(t, s);
s->type = t;
Remove library on mk nuke.
[rsc] --rw-rw-r-- M 129339 glenda sys 665 Dec 12 07:22 sys/src/cmd/mksyslib
/n/sourcesdump/2005/1212/plan9/sys/src/cmd/mksyslib:34,40 -
/n/sourcesdump/2005/1213/plan9/sys/src/cmd/mksyslib:34,40
rm -f $stem.[$OS] [$OS].$stem $stem.acid $stem
nuke:V:
- rm -f *.[$OS] [$OS].out $CLEANFILES
+ rm -f *.[$OS] [$OS].out $CLEANFILES $LIB
%.acid: %.$O $HFILES
$CC $CFLAGS -a $stem.c >$target
Only nuke $objtype.
[rsc] --rw-rw-r-- M 129339 glenda sys 745 Dec 12 09:06 sys/src/libc/mkfile
/n/sourcesdump/2005/1212/plan9/sys/src/libc/mkfile:1,9 -
/n/sourcesdump/2005/1213/plan9/sys/src/libc/mkfile:1,10
</$objtype/mkfile
- DIRS=9sys 9syscall fmt port $CPUS
+ PORTDIRS=9sys 9syscall fmt port
+ DIRS=$PORTDIRS $CPUS
all install:V:
- for(i in 9sys 9syscall fmt port $objtype)@{
+ for(i in $PORTDIRS $objtype)@{
echo $i
cd $i
mk $MKFLAGS install
/n/sourcesdump/2005/1212/plan9/sys/src/libc/mkfile:17,26 -
/n/sourcesdump/2005/1213/plan9/sys/src/libc/mkfile:18,33
}
nuke:V:
- for(i in $DIRS)@{
+ for(i in $PORTDIRS $objtype)@{
echo $i
cd $i
mk $MKFLAGS nuke
+ }
+ # do not nuke other objtypes
+ for(i in $CPUS)@{
+ echo $i
+ cd $i
+ mk $MKFLAGS clean
}
update:V:
[rsc] --rw-rw-r-- M 129339 glenda sys 962 Dec 12 17:27 sys/src/libmp/mkfile
/n/sourcesdump/2005/1212/plan9/sys/src/libmp/mkfile:4,15 -
/n/sourcesdump/2005/1213/plan9/sys/src/libmp/mkfile:4,18
default:V: all
- install clean nuke all:V:
+ install clean all:V:
for(i in port $objtype)@{
echo $i
cd $i
mk $MKFLAGS $target
}
+
+ nuke:V: clean
+ rm -f /$objtype/lib/libmp.a
update:V:
for(i in port $CPUS)@{
[rsc] --rw-rw-r-- M 129339 glenda sys 554 Dec 12 17:28 sys/src/libsec/mkfile
/n/sourcesdump/2005/1212/plan9/sys/src/libsec/mkfile:1,6 -
/n/sourcesdump/2005/1213/plan9/sys/src/libsec/mkfile:1,6
</$objtype/mkfile
- DIRS=port 386 alpha arm mips power
+ DIRS=port $CPUS
default:V: all
/n/sourcesdump/2005/1212/plan9/sys/src/libsec/mkfile:11,17 -
/n/sourcesdump/2005/1213/plan9/sys/src/libsec/mkfile:11,17
mk $MKFLAGS $target
}
- clean nuke:V:
+ clean:V:
for(i in $DIRS)@{
echo $i
cd $i
/n/sourcesdump/2005/1212/plan9/sys/src/libsec/mkfile:18,23 -
/n/sourcesdump/2005/1213/plan9/sys/src/libsec/mkfile:18,26
mk $MKFLAGS $target
}
+ nuke:V: clean
+ rm -f /$objtype/lib/libsec.a
+
update:V:
for(i in $DIRS)@{
echo $i
/n/sourcesdump/2005/1212/plan9/sys/src/libsec/mkfile:30,38 -
/n/sourcesdump/2005/1213/plan9/sys/src/libsec/mkfile:33,41
for(objtype in $CPUS) mk $MKFLAGS install
everything:V:
- rm -f */*.[012456789kvx]
+ rm -f */*.[012456789kqv]
for(objtype in 386)@{
echo $objtype
mk $MKFLAGS install
}
- rm -f */*.[012456789kvx]
+ rm -f */*.[012456789kqv]
|