Browse Source

Plan 9 from Bell Labs 2004-07-29

David du Colombier 17 years ago
parent
commit
10ea40982b

+ 5 - 4
dist/replica/_plan9.db

@@ -3107,7 +3107,7 @@ rc/bin/thesaurus - 775 sys sys 1068054167 246
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
 rc/bin/tlssrvtunnel - 775 sys sys 1024375634 175
 rc/bin/troff2gif - 775 sys sys 1045504085 178
-rc/bin/ups - 775 sys sys 1051028686 889
+rc/bin/ups - 775 sys sys 1091021981 806
 rc/bin/uptime - 775 sys sys 1074730712 234
 rc/bin/usbstart - 775 sys sys 1044894155 81
 rc/bin/usps - 775 sys sys 1016826030 450
@@ -3327,7 +3327,7 @@ sys/doc/venti/venti.pdf - 755 sys sys 1020384352 139090
 sys/doc/venti/venti.ps - 664 sys sys 1019852320 2012620
 sys/games - 20000000775 sys sys 952648872 0
 sys/games/lib - 20000000775 sys sys 952648879 0
-sys/games/lib/fortunes - 664 sys sys 1089299186 248807
+sys/games/lib/fortunes - 664 sys sys 1091022704 248857
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include/9p.h - 664 sys sys 1044836327 4309
 sys/include/String.h - 664 sys sys 1055701304 1291
@@ -5534,7 +5534,7 @@ sys/src/9/ppc/m8260.c - 664 sys sys 1077376312 14480
 sys/src/9/ppc/m8260.h - 664 sys sys 1068135488 20913
 sys/src/9/ppc/main.c - 664 sys sys 1072705483 9044
 sys/src/9/ppc/mcc.c - 664 sys sys 1059490752 9667
-sys/src/9/ppc/mem.h - 664 sys sys 1072705482 6998
+sys/src/9/ppc/mem.h - 664 sys sys 1091021860 7002
 sys/src/9/ppc/mkfile - 664 sys sys 1067722849 1813
 sys/src/9/ppc/mmu.c - 664 sys sys 1059490753 4865
 sys/src/9/ppc/msaturn.c - 664 sys sys 1072705482 2801
@@ -10896,7 +10896,7 @@ sys/src/cmd/usb/audio/dat.h - 664 sys sys 1045503798 3603
 sys/src/cmd/usb/audio/dump.c - 664 sys sys 1045503798 7065
 sys/src/cmd/usb/audio/fns.h - 664 sys sys 1018387004 474
 sys/src/cmd/usb/audio/fs.c - 664 sys sys 1045503799 18550
-sys/src/cmd/usb/audio/main.c - 664 sys sys 1045503799 9312
+sys/src/cmd/usb/audio/main.c - 664 sys sys 1091021907 9533
 sys/src/cmd/usb/audio/mkfile - 664 sys sys 1045503800 351
 sys/src/cmd/usb/lib - 20000000775 sys sys 1018369393 0
 sys/src/cmd/usb/lib/config.c - 664 sys sys 1018462834 6210
@@ -12339,3 +12339,4 @@ usr/glenda/lib/profile - 664 glenda glenda 1021580005 847
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/usb/usbaudio - 775 sys sys 1091071249 172909

+ 5 - 5
dist/replica/plan9.db

@@ -453,7 +453,7 @@
 386/bin/upas/unspam - 775 sys sys 1064598367 38
 386/bin/upas/vf - 775 sys sys 1087873352 90619
 386/bin/usb - 20000000775 sys sys 1019538890 0
-386/bin/usb/usbaudio - 775 sys sys 1085077118 172912
+386/bin/usb/usbaudio - 775 sys sys 1091071249 172909
 386/bin/usb/usbd - 775 sys sys 1085077118 122174
 386/bin/usb/usbmouse - 775 sys sys 1085077119 138047
 386/bin/usb/usbprinter - 775 sys sys 1089408719 222
@@ -3107,7 +3107,7 @@ rc/bin/thesaurus - 775 sys sys 1068054167 246
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
 rc/bin/tlssrvtunnel - 775 sys sys 1024375634 175
 rc/bin/troff2gif - 775 sys sys 1045504085 178
-rc/bin/ups - 775 sys sys 1051028686 889
+rc/bin/ups - 775 sys sys 1091021981 806
 rc/bin/uptime - 775 sys sys 1074730712 234
 rc/bin/usbstart - 775 sys sys 1044894155 81
 rc/bin/usps - 775 sys sys 1016826030 450
@@ -3327,7 +3327,7 @@ sys/doc/venti/venti.pdf - 755 sys sys 1020384352 139090
 sys/doc/venti/venti.ps - 664 sys sys 1019852320 2012620
 sys/games - 20000000775 sys sys 952648872 0
 sys/games/lib - 20000000775 sys sys 952648879 0
-sys/games/lib/fortunes - 664 sys sys 1089299186 248807
+sys/games/lib/fortunes - 664 sys sys 1091022704 248857
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include/9p.h - 664 sys sys 1044836327 4309
 sys/include/String.h - 664 sys sys 1055701304 1291
@@ -5534,7 +5534,7 @@ sys/src/9/ppc/m8260.c - 664 sys sys 1077376312 14480
 sys/src/9/ppc/m8260.h - 664 sys sys 1068135488 20913
 sys/src/9/ppc/main.c - 664 sys sys 1072705483 9044
 sys/src/9/ppc/mcc.c - 664 sys sys 1059490752 9667
-sys/src/9/ppc/mem.h - 664 sys sys 1072705482 6998
+sys/src/9/ppc/mem.h - 664 sys sys 1091021860 7002
 sys/src/9/ppc/mkfile - 664 sys sys 1067722849 1813
 sys/src/9/ppc/mmu.c - 664 sys sys 1059490753 4865
 sys/src/9/ppc/msaturn.c - 664 sys sys 1072705482 2801
@@ -10896,7 +10896,7 @@ sys/src/cmd/usb/audio/dat.h - 664 sys sys 1045503798 3603
 sys/src/cmd/usb/audio/dump.c - 664 sys sys 1045503798 7065
 sys/src/cmd/usb/audio/fns.h - 664 sys sys 1018387004 474
 sys/src/cmd/usb/audio/fs.c - 664 sys sys 1045503799 18550
-sys/src/cmd/usb/audio/main.c - 664 sys sys 1045503799 9312
+sys/src/cmd/usb/audio/main.c - 664 sys sys 1091021907 9533
 sys/src/cmd/usb/audio/mkfile - 664 sys sys 1045503800 351
 sys/src/cmd/usb/lib - 20000000775 sys sys 1018369393 0
 sys/src/cmd/usb/lib/config.c - 664 sys sys 1018462834 6210

+ 5 - 0
dist/replica/plan9.log

@@ -16327,3 +16327,8 @@
 1090688519 0 c 386/9pc - 775 sys sys 1090688306 1808618
 1090688519 1 c 386/9pcdisk - 775 sys sys 1090688310 2011224
 1090688519 2 c 386/9pcf - 775 sys sys 1090688315 2342867
+1091023263 0 c rc/bin/ups - 775 sys sys 1091021981 806
+1091023263 1 c sys/games/lib/fortunes - 664 sys sys 1091022704 248857
+1091023263 2 c sys/src/9/ppc/mem.h - 664 sys sys 1091021860 7002
+1091023263 3 c sys/src/cmd/usb/audio/main.c - 664 sys sys 1091021907 9533
+1091071873 0 c 386/bin/usb/usbaudio - 775 sys sys 1091071249 172909

+ 1 - 4
rc/bin/ups

@@ -1,10 +1,7 @@
 #!/bin/rc
 
 # lucent web proxy caches the page; defeat it
-#LU rfork n
-#LU if(! test -d /net.alt/tcp) import achille /net.alt
-#LU bind /net.alt /net
-
+rfork n
 
 if(! ~ $#* 1) {
 	echo usage: ups 1ZA41W190338680961 >[1=2]

+ 2 - 0
sys/games/lib/fortunes

@@ -4011,3 +4011,5 @@ We lead by following standards. - sape
 -bash: /home/r/.bash_logout: Permission denied
 I am he as you are he as you are me and we are all together. - forsyth after Lennon on authentication
 Network services at the Murray Hill, NJ, location (100001) will be unavailable due to UPS (Uninterrupted Power Supply) maintenance from 8:00 p.m. EDT on Saturday, June 26, to 4:00 a.m. EDT on Sunday, June 27.
+Don't show this message again.
+Service error -27.

+ 39 - 39
sys/src/9/ppc/mem.h

@@ -15,20 +15,20 @@
 #define	BI2BY		8			/* bits per byte */
 #define	BI2WD		32			/* bits per word */
 #define	BY2WD		4			/* bytes per word */
-#define 	BY2V		8			/* bytes per vlong */
-#define	BY2PG		4096		/* bytes per page */
-#define	WD2PG		(BY2PG/BY2WD)	/* words per page */
+#define BY2V		8			/* bytes per vlong */
+#define	BY2PG		4096			/* bytes per page */
+#define	WD2PG		(BY2PG/BY2WD)		/* words per page */
 #define	PGSHIFT		12			/* log(BY2PG) */
-#define 	ROUND(s, sz)	(((s)+(sz-1))&~(sz-1))
-#define 	PGROUND(s)	ROUND(s, BY2PG)
+#define ROUND(s, sz)	(((s)+(sz-1))&~(sz-1))
+#define PGROUND(s)	ROUND(s, BY2PG)
 #define	CACHELINELOG	5
 #define	CACHELINESZ	(1<<CACHELINELOG)
 #define	BLOCKALIGN	CACHELINESZ
 
-#define	MHz	1000000
+#define	MHz		1000000
 
-#define	BY2PTE		8				/* bytes per pte entry */
-#define	BY2PTEG		64				/* bytes per pte group */
+#define	BY2PTE		8			/* bytes per pte entry */
+#define	BY2PTEG		64			/* bytes per pte group */
 
 #define	MAXMACH	1				/* max # cpus system can run */
 #define	MACHSIZE	BY2PG
@@ -77,11 +77,11 @@
 /*
  * PPC604e-specific Special Purpose Registers (OEA)
  */
-#define MMCR0	952		/* Monitor Control Register 0 */
+#define MMCR0		952		/* Monitor Control Register 0 */
 #define PMC1		953		/* Performance Monitor Counter 1 */
 #define PMC2		954		/* Performance Monitor Counter 2 */
 #define SIA		955		/* Sampled Instruction Address */
-#define MMCR1	956		/* Monitor Control Register 0 */
+#define MMCR1		956		/* Monitor Control Register 0 */
 #define PMC3		957		/* Performance Monitor Counter 3 */
 #define PMC4		958		/* Performance Monitor Counter 4 */
 #define SDA		959		/* Sampled Data Address */
@@ -102,15 +102,15 @@
  */
 #define HID2		1011	/* Hardware Implementation Dependent Register 2 */
 
-#define	BIT(i)	(1<<(31-(i)))	/* Silly backwards register bit numbering scheme */
-#define	SBIT(n)	((ushort)1<<(15-(n)))
+#define	BIT(i)		(1<<(31-(i)))	/* Silly backwards register bit numbering scheme */
+#define	SBIT(n)		((ushort)1<<(15-(n)))
 #define	RBIT(b,n)	(1<<(8*sizeof(n)-1-(b)))
 
 /*
  * Bit encodings for Machine State Register (MSR)
  */
 #define MSR_POW		BIT(13)		/* Enable Power Management */
-#define MSR_TGPR		BIT(14)		/* Temporary GPR Registers in use (603e) */
+#define MSR_TGPR	BIT(14)		/* Temporary GPR Registers in use (603e) */
 #define MSR_ILE		BIT(15)		/* Interrupt Little-Endian enable */
 #define MSR_EE		BIT(16)		/* External Interrupt enable */
 #define MSR_PR		BIT(17)		/* Supervisor/User privilege */
@@ -129,9 +129,9 @@
 /* SRR1 bits for TLB operations */
 #define MSR_SR0		0xf0000000	/* Saved bits from CR register */
 #define MSR_KEY		BIT(12)		/* Copy of Ks or Kp bit */
-#define MSR_IMISS		BIT(13)		/* It was an I miss */
+#define MSR_IMISS	BIT(13)		/* It was an I miss */
 #define MSR_WAY		BIT(14)		/* TLB set to be replaced */
-#define MSR_STORE		BIT(15)		/* Miss caused by a store */
+#define MSR_STORE	BIT(15)		/* Miss caused by a store */
 
 /*
  * Exception codes (trap vectors)
@@ -141,27 +141,27 @@
 #define CDSI		0x03
 #define CISI		0x04
 #define CEI		0x05
-#define CALIGN	0x06
+#define CALIGN		0x06
 #define CPROG		0x07
 #define CFPU		0x08
 #define CDEC		0x09
 #define CSYSCALL	0x0C
-#define CTRACE	0x0D	/* optional */
-#define CFPA		0x0E		/* not implemented in 603e */
+#define CTRACE		0x0D	/* optional */
+#define CFPA		0x0E	/* not implemented in 603e */
 
 /* PPC603e-specific: */
 #define CIMISS		0x10	/* Instruction TLB miss */
-#define CLMISS	0x11	/* Data load TLB miss */
-#define CSMISS	0x12	/* Data store TLB miss */
-#define CIBREAK	0x13
+#define CLMISS		0x11	/* Data load TLB miss */
+#define CSMISS		0x12	/* Data store TLB miss */
+#define CIBREAK		0x13
 #define CSMI		0x14
 
 /*
  * Magic registers
  */
 
-#define	MACH	30		/* R30 is m-> */
-#define	USER		29		/* R29 is up-> */
+#define	MACH		30	/* R30 is m-> */
+#define	USER		29	/* R29 is up-> */
 
 
 /*
@@ -181,25 +181,25 @@
 /*
  *  Second pte word; WIMG & PP(RW/RO) common to page table and BATs
  */
-#define	PTE1_R	BIT(23)
-#define	PTE1_C	BIT(24)
+#define	PTE1_R		BIT(23)
+#define	PTE1_C		BIT(24)
 
-#define	PTE1_W	BIT(25)
-#define	PTE1_I	BIT(26)
-#define	PTE1_M	BIT(27)
-#define	PTE1_G	BIT(28)
+#define	PTE1_W		BIT(25)
+#define	PTE1_I		BIT(26)
+#define	PTE1_M		BIT(27)
+#define	PTE1_G		BIT(28)
 
-#define	PTE1_RW	BIT(30)
-#define	PTE1_RO	BIT(31)
+#define	PTE1_RW		BIT(30)
+#define	PTE1_RO		BIT(31)
 
 /* HID0 register bits */
 #define	HID_ICE		BIT(16)
 #define	HID_DCE		BIT(17)
 #define	HID_ILOCK	BIT(18)
 #define	HID_DLOCK	BIT(19)
-#define	HID_ICFI		BIT(20)
-#define	HID_DCFI		BIT(21)
-#define	HID_IFEM		BIT(24)
+#define	HID_ICFI	BIT(20)
+#define	HID_DCFI	BIT(21)
+#define	HID_IFEM	BIT(24)
 
 /*
  * Address spaces
@@ -207,16 +207,16 @@
 
 #define	KZERO		0x80000000		/* base of kernel address space */
 #define	KTZERO		0x80100000		/* first address in kernel text */
-#define	UZERO		0				/* base of user address space */
-#define	UTZERO		(UZERO+BY2PG)	/* first address in user text */
+#define	UZERO		0			/* base of user address space */
+#define	UTZERO		(UZERO+BY2PG)		/* first address in user text */
 #define	USTKTOP		(TSTKTOP-TSTKSIZ*BY2PG)	/* byte just beyond user stack */
 #define	TSTKTOP		KZERO			/* top of temporary stack */
 #define	TSTKSIZ		100
-#define	USTKSIZE		(4*1024*1024)		/* size of user stack */
-#define	UREGSIZE		((8+40)*4)
+#define	USTKSIZE	(4*1024*1024)		/* size of user stack */
+#define	UREGSIZE	((8+40)*4)
 #define	MACHADDR	(KTZERO-MAXMACH*MACHSIZE)
 #define	MACHPADDR	(MACHADDR&~KZERO)
-#define	MACHP(n)		((Mach *)(MACHADDR+(n)*MACHSIZE))
+#define	MACHP(n)	((Mach *)(MACHADDR+(n)*MACHSIZE))
 
 #define isphys(x) (((ulong)x&KZERO)!=0)
 

+ 9 - 3
sys/src/cmd/usb/audio/main.c

@@ -374,8 +374,14 @@ threadmain(int argc, char **argv)
 			sysfatal("Can't set play resolution");
 		getcontrols(nx);	/* Get the initial value of all controls */
 		value[0] = 44100;
-		if(setcontrol(nx, "speed", value) < 0)
-			fprint(2, "warning: Can't set play speed\n");
+		if(setcontrol(nx, "speed", value) < 0){
+			fprint(2, "warning: Can't set play speed to %d\n", value[0]);
+			value[0] = 48000;
+			if(setcontrol(nx, "speed", value) < 0)
+				fprint(2, "warning: Can't set play speed to %d\n", value[0]);
+			else
+				fprint(2, "warning: Play speed set to %d\n", value[0]);
+		}
 		value[0] = 0;
 		setcontrol(nx, "mute", value);
 		if(volume[0] != Undef) {
@@ -399,7 +405,7 @@ threadmain(int argc, char **argv)
 		getcontrols(nx);	/* Get the initial value of all controls */
 		value[0] = 44100;
 		if(setcontrol(nx, "speed", value) < 0)
-			sysfatal("Can't set record speed");
+			fprint(2, "Can't set record speed\n");
 		if(volume[0] != Undef) {
 			c = &nx->control[Volume_control];
 			if(c->settable)