libsec: allow user-passed DigestState in hmac functions [rsc] --rw-rw-r-- M 1635703 glenda sys 1183 Feb 23 06:31 sys/src/libsec/port/hmac.c /n/sourcesdump/2006/0223/plan9/sys/src/libsec/port/hmac.c:16,28 - /n/sourcesdump/2006/0224/plan9/sys/src/libsec/port/hmac.c:16,28 return nil; /* first time through */ - if(s == nil){ + if(s == nil || s->seeded == 0){ for(i=0; i<64; i++) pad[i] = 0x36; pad[64] = 0; for(i=0; i<klen; i++) pad[i] ^= key[i]; - s = (*x)(pad, 64, nil, nil); + s = (*x)(pad, 64, nil, s); if(s == nil) return nil; } diffy: new command [rsc] --rwxrwxr-x M 1635703 rsc sys 277 Feb 23 06:41 rc/bin/diffy [rsc] --rw-rw-r-- M 1635703 glenda sys 2607 Feb 23 06:41 sys/man/1/yesterday /n/sourcesdump/2006/0223/plan9/sys/man/1/yesterday:1,6 - /n/sourcesdump/2006/0224/plan9/sys/man/1/yesterday:1,6 .TH YESTERDAY 1 .SH NAME - yesterday \- print file names from the dump + yesterday, diffy \- print file names from the dump .SH SYNOPSIS .B yesterday [ /n/sourcesdump/2006/0223/plan9/sys/man/1/yesterday:12,17 - /n/sourcesdump/2006/0224/plan9/sys/man/1/yesterday:12,23 .I \-date ] .I files ... + .PP + .I diffy + [ + .B -abcefmnrw + ] + .I files ... .SH DESCRIPTION .I Yesterday prints the names of the /n/sourcesdump/2006/0223/plan9/sys/man/1/yesterday:98,103 - /n/sourcesdump/2006/0224/plan9/sys/man/1/yesterday:104,116 .PP .I Yesterday does not guarantee that the string it prints represents an existing file. + .PP + .I Diffy + runs + .IR diff (1) + with the given options + to compare yesterday's version of each of the named files + with today's. .SH EXAMPLES .PP Back up to yesterday's MIPS binary of /n/sourcesdump/2006/0223/plan9/sys/man/1/yesterday:121,126 - /n/sourcesdump/2006/0224/plan9/sys/man/1/yesterday:134,145 .IP .EX yesterday -d -0301 /sys/src/libc/port/*.c + .EE + .PP + Find what has changed in the source tree today: + .IP + .EX + diffy -r /sys/src .EE .SH FILES .B /n/dump acid: avoid runtime error in thread library [rsc] --rw-rw-r-- M 1635703 glenda sys 6143 Feb 23 06:41 sys/lib/acid/thread /n/sourcesdump/2006/0223/plan9/sys/lib/acid/thread:72,78 - /n/sourcesdump/2006/0224/plan9/sys/lib/acid/thread:72,80 return sym[0]; s = tail s; } - return itoa(a, "%x"); + if a == {} then + return "{}"; + return itoa(a\X, "%x"); } stkignorelist = {}; /n/sourcesdump/2006/0223/plan9/sys/lib/acid/thread:82,88 - /n/sourcesdump/2006/0224/plan9/sys/lib/acid/thread:84,90 } defn threadstkline(T){ - local stk, frame, pc, pc0, file, lastpc0, s, sym, i, stop; + local ostk, stk, frame, pc, pc0, file, lastpc0, s, sym, i, stop; if T.state == Running then{ pc = *PC; /n/sourcesdump/2006/0223/plan9/sys/lib/acid/thread:91,99 - /n/sourcesdump/2006/0224/plan9/sys/lib/acid/thread:93,103 pc = labpc(T.sched); stk = strace(labpc(T.sched), labsp(T.sched), 0); } + firstpc = pc; lastpc0 = 0; pc0 = 0; stop = 0; + ostk = stk; while stk && !stop do { file = pcfile(pc); if !regexp("^/sys/src/libc/", file) /n/sourcesdump/2006/0223/plan9/sys/lib/acid/thread:100,106 - /n/sourcesdump/2006/0224/plan9/sys/lib/acid/thread:104,114 && !regexp("^/sys/src/libthread/", file) && match(file, stkignore)==-1 then stop = 1; - else{ + else if stk[0][1] == 0xfefefefe then { + pc = ostk[0][1]; + pc0 = ostk[1][0]; + stop = 1; + }else{ lastpc0 = pc0; frame = head stk; stk = tail stk; libthread: typo in comment [rsc] --rw-rw-r-- M 1635703 rsc sys 880 Feb 23 06:44 sys/src/libthread/iocall.c /n/sourcesdump/2006/0223/plan9/sys/src/libthread/iocall.c:29,35 - /n/sourcesdump/2006/0224/plan9/sys/src/libthread/iocall.c:29,35 } /* - * If we get interrupted, we have stick around so that + * If we get interrupted, we have to stick around so that * the IO proc has someone to talk to. Send it an interrupt * and try again. */ diff(1): formatting nit [rsc] --rw-rw-r-- M 1635703 glenda sys 3089 Feb 23 06:41 sys/man/1/diff /n/sourcesdump/2006/0223/plan9/sys/man/1/diff:5,11 - /n/sourcesdump/2006/0224/plan9/sys/man/1/diff:5,12 .B diff [ .B -abcefmnrw - ] file1 ... file2 + ] + .I file1 ... file2 .SH DESCRIPTION .I Diff tells what lines must be changed in two files to bring them kernel: update device list [rsc] --rw-rw-r-- M 1635703 glenda sys 490 Feb 23 06:45 sys/src/9/port/master /n/sourcesdump/2006/0223/plan9/sys/src/9/port/master:19,24 - /n/sourcesdump/2006/0224/plan9/sys/src/9/port/master:19,25 U usb V lml V tv + X loopback Y pccard a tls b irq factotum: add httpdigest client protocol [rsc] --rw-rw-r-- M 1635703 glenda sys 4991 Feb 23 06:41 sys/src/cmd/auth/factotum/dat.h /n/sourcesdump/2006/0223/plan9/sys/src/cmd/auth/factotum/dat.h:234,236 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/auth/factotum/dat.h:234,237 extern Proto rsa; /* rsa.c */ extern Proto wep; /* wep.c */ /* extern Proto srs; /* srs.c */ + extern Proto httpdigest; /* httpdigest.c */ [rsc] --rw-rw-r-- M 1635703 glenda sys 10558 Feb 23 06:41 sys/src/cmd/auth/factotum/fs.c /n/sourcesdump/2006/0223/plan9/sys/src/cmd/auth/factotum/fs.c:29,34 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/auth/factotum/fs.c:29,35 &apop, &chap, &cram, + &httpdigest, &mschap, &p9any, &p9cr, [rsc] --rw-rw-r-- M 1635703 rsc sys 3481 Feb 23 06:41 sys/src/cmd/auth/factotum/httpdigest.c [rsc] --rw-rw-r-- M 1635703 glenda sys 497 Feb 23 06:41 sys/src/cmd/auth/factotum/mkfile /n/sourcesdump/2006/0223/plan9/sys/src/cmd/auth/factotum/mkfile:6,11 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/auth/factotum/mkfile:6,12 PROTO=\ apop.$O\ chap.$O\ + httpdigest.$O\ p9any.$O\ p9cr.$O\ p9sk1.$O\ usb/audio: some things aren't worth knowing [rsc] --rw-rw-r-- M 1635703 sape sys 18208 Feb 23 06:44 sys/src/cmd/usb/audio/audiofs.c /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/audiofs.c:8,13 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/audiofs.c:8,15 #include "usbaudio.h" #include "usbaudioctl.h" + int attachok; + #define STACKSIZE 16*1024 enum /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/audiofs.c:154,160 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/audiofs.c:156,162 int fd; char buf[32]; - fd = create(name, OWRITE, 0600); + fd = create(name, OWRITE, attachok?0666:0600); if(fd < 0) return; sprint(buf, "%d",srvfd); /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/audiofs.c:271,277 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/audiofs.c:273,279 f->flags |= Busy; f->dir = &dirs[Qdir]; rhdr.qid = f->dir->qid; - if(strcmp(thdr.uname, user) != 0) + if(attachok == 0 && strcmp(thdr.uname, user) != 0) return Eperm; return 0; } /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/audiofs.c:386,394 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/audiofs.c:388,395 if(f->dir == &dirs[Qaudio] || f->dir == &dirs[Qaudioin]) return Eperm; - if(thdr.mode != OREAD) - if((f->dir->mode & 0x2) == 0) - return Eperm; + if(thdr.mode != OREAD && (f->dir->mode & 0x2) == 0) + return Eperm; qlock(f); if(f->dir == &dirs[Qaudioctl] && f->fiddata == nil) f->fiddata = allocaudioctldata(); [rsc] --rw-rw-r-- M 1635703 sape sys 8085 Feb 23 06:44 sys/src/cmd/usb/audio/audiosub.c /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/audiosub.c:97,102 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/audiosub.c:97,135 case 0x04: if (verbose) fprint(2, "Audio Mixer Unit %d\n", b[3]); + if (debug & Dbginfo){ + fprint(2, "\t%d bytes:", nb); + for(ctl = 0; ctl < nb; ctl++) + fprint(2, " 0x%2.2x", b[ctl]); + fprint(2, "\n\tbUnitId %d, bNrInPins %d", b[3], b[4]); + } + if (b[4]){ + if(debug & Dbginfo) fprint(2, ", baSourceIDs: [%d", b[5]); + u = findunit(b[5]); + for (ctl = 1; ctl < b[4]; ctl++){ + if (u < 0) + u = findunit(b[5+ctl]); + else if ((x = findunit(b[5+ctl])) >= 0 && u != x && verbose) + fprint(2, "\tMixer %d for output AND input\n", b[3]); + if (debug & Dbginfo) fprint(2, ", %d", b[5+ctl]); + } + if (debug & Dbginfo) fprint(2, "]\n"); + if (u >= 0){ + units[u][nunits[u]++] = b[3]; + if (mixerid[u] >= 0) + fprint(2, "Second mixer (%d, %d) on %s\n", mixerid[u], b[3], u?"record":"playback"); + mixerid[u] = b[3]; + } + if (debug & Dbginfo){ + fprint(2, "Channels %d, config %d, ", + b[ctl+5], b[ctl+5+1] | b[ctl+5+2] << 8); + x = b[ctl+5] * b[4]; + fprint(2, "programmable: %d bits, 0x", x); + x = (x + 7) >> 3; + while(x--) + fprint(2, "%2.2x", b[ctl+x+5+4]); + } + } break; case 0x05: if (verbose) /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/audiosub.c:104,111 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/audiosub.c:137,145 if (debug & Dbginfo) fprint(2, "\tbUnitId %d, bNrInPins %d", b[3], b[4]); if (b[4]){ - if (debug & Dbginfo) fprint(2, ", baSourceIDs: [%d", b[5]); u = findunit(b[5]); + if (debug & Dbginfo) fprint(2, ", baSourceIDs: %s [%d", + u?"record":"playback", b[5]); for (ctl = 1; ctl < b[4]; ctl++){ if (u < 0) u = findunit(b[5+ctl]); [rsc] --rw-rw-r-- M 1635703 sape sys 10155 Feb 23 06:44 sys/src/cmd/usb/audio/usbaudio.c /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/usbaudio.c:252,257 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/usbaudio.c:252,258 long volume[8]; Audiocontrol *c; char buf[32], *p, line[256]; + extern int attachok; ctlrno = -1; id = -1; /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/usbaudio.c:281,286 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/usbaudio.c:282,290 case 's': srvpost = EARGF(usage()); break; + case 'p': + attachok++; + break; default: usage(); }ARGEND /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/usbaudio.c:329,334 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/usbaudio.c:333,341 findendpoints(); if (endpt[Play] >= 0){ + if(verbose) + fprint(2, "Setting default play parameters: %d Hz, %d channels at %d bits\n", + defaultspeed[Play], 2, 16); if(findalt(Play, 2, 16, defaultspeed[Play]) < 0){ if(findalt(Play, 2, 16, 48000) < 0) sysfatal("Can't configure playout for %d or %d Hz", defaultspeed[Play], 48000); /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/usbaudio.c:345,350 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/usbaudio.c:352,360 } if (endpt[Record] >= 0){ + if(verbose) + fprint(2, "Setting default record parameters: %d Hz, %d channels at %d bits\n", + defaultspeed[Play], 2, 16); if(findalt(Record, 2, 16, defaultspeed[Record]) < 0){ if(findalt(Record, 2, 16, 48000) < 0) sysfatal("Can't configure record for %d or %d Hz", defaultspeed[Record], 48000); [rsc] --rw-rw-r-- M 1635703 sape sys 1889 Feb 23 06:44 sys/src/cmd/usb/audio/usbaudio.h /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/usbaudio.h:13,22 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/usbaudio.h:13,24 Delay_control = 0x08, Bassboost_control = 0x09, Loudness_control = 0x0a, - /* Items below are define by implementation: */ + /* Items below are defined by implementation: */ Channel_control = 0x0b, Resolution_control = 0x0c, Ncontrol, + Selector_control = 0x0d, + sampling_freq_control = 0x01, }; [rsc] --rw-rw-r-- M 1635703 sape sys 18245 Feb 23 06:44 sys/src/cmd/usb/audio/usbaudioctl.c [diffs elided - too long] [diff -c /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/usbaudioctl.c /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/usbaudioctl.c] [rsc] --rw-rw-r-- M 1635703 sape sys 618 Feb 23 06:44 sys/src/cmd/usb/audio/usbaudioctl.h /n/sourcesdump/2006/0223/plan9/sys/src/cmd/usb/audio/usbaudioctl.h:7,26 - /n/sourcesdump/2006/0224/plan9/sys/src/cmd/usb/audio/usbaudioctl.h:7,26 typedef struct Audiocontrol Audiocontrol; struct Audiocontrol { - char *name; + char *name; uchar readable; uchar settable; uchar chans; /* 0 is master, non-zero is bitmap */ - long value[8]; /* 0 is master; value[0] == Undef -> all values Undef */ - long min, max, step; + long value[8]; /* 0 is master; value[0] == Undef -> all values Undef */ + long min, max, step; }; - extern Audiocontrol controls[2][Ncontrol]; extern int endpt[2]; extern int interface[2]; extern int featureid[2]; extern int selectorid[2]; + extern int mixerid[2]; extern int buttonendpt; int ctlparse(char *s, Audiocontrol *c, long *v); 9load: update drivers [jmk] --rw-rw-r-- M 1635703 glenda sys 41433 Feb 23 11:13 sys/src/boot/pc/devpccard.c [diffs elided - too long] [diff -c /n/sourcesdump/2006/0223/plan9/sys/src/boot/pc/devpccard.c /n/sourcesdump/2006/0224/plan9/sys/src/boot/pc/devpccard.c] [jmk] --rw-rw-r-- M 1635703 jmk sys 40769 Feb 23 11:03 sys/src/boot/pc/etherigbe.c [diffs elided - too long] [diff -c /n/sourcesdump/2006/0223/plan9/sys/src/boot/pc/etherigbe.c /n/sourcesdump/2006/0224/plan9/sys/src/boot/pc/etherigbe.c] [jmk] --rwxrwxr-x M 1635703 glenda sys 312052 Feb 23 15:25 386/9loaddebug [jmk] --rwxrwxr-x M 1635703 glenda sys 200137 Feb 23 15:25 386/9loadlitedebug