Browse Source

Plan 9 from Bell Labs 2005-02-28

David du Colombier 16 years ago
parent
commit
f40e4d1247

+ 21 - 20
dist/replica/_plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1100269948 208708
-386/9loaddebug - 775 sys sys 1108268393 306473
+386/9loaddebug - 775 sys sys 1109477747 309905
 386/9loadlite - 775 sys sys 1100269949 132260
-386/9loadlitedebug - 775 sys sys 1108268393 195556
+386/9loadlitedebug - 775 sys sys 1109477747 198992
 386/9pc - 775 sys sys 1109132016 1833270
 386/9pc.gz - 664 sys sys 1077049336 635727
 386/9pccpu - 775 sys sys 1109132020 1487821
@@ -15,7 +15,7 @@
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1108285260 115096
-386/bin/8c - 775 sys sys 1109303823 358000
+386/bin/8c - 775 sys sys 1109477746 358000
 386/bin/8l - 775 sys sys 1107835553 115728
 386/bin/9660srv - 775 sys sys 1108354539 103973
 386/bin/aan - 775 sys sys 1108354539 130710
@@ -3042,16 +3042,17 @@ rc/bin/mousereset - 775 sys sys 1015089542 37
 rc/bin/nroff - 775 sys sys 945617208 27
 rc/bin/patch - 20000000775 sys sys 1067803227 0
 rc/bin/patch/applied - 775 sys sys 1081204295 110
-rc/bin/patch/apply - 775 sys sys 1089299188 1276
+rc/bin/patch/apply - 775 sys sys 1109511606 1285
 rc/bin/patch/create - 775 sys sys 1107957505 1404
-rc/bin/patch/diff - 775 sys sys 1106151131 466
-rc/bin/patch/email - 775 sys sys 1107836219 401
-rc/bin/patch/list - 775 sys sys 1107957885 696
-rc/bin/patch/move - 775 sys sys 1104430337 565
-rc/bin/patch/note - 664 sys sys 1089299189 655
-rc/bin/patch/okay - 775 sys sys 1087487682 242
+rc/bin/patch/diff - 775 sys sys 1109511606 474
+rc/bin/patch/email - 775 sys sys 1109511607 409
+rc/bin/patch/list - 775 sys sys 1109511607 704
+rc/bin/patch/move - 775 sys sys 1109511607 573
+rc/bin/patch/note - 664 sys sys 1109511607 663
+rc/bin/patch/okay - 775 sys sys 1109511608 250
+rc/bin/patch/remove - 775 sys sys 1109511608 285
 rc/bin/patch/sorry - 775 sys sys 1081200166 107
-rc/bin/patch/undo - 775 sys sys 1067804405 549
+rc/bin/patch/undo - 775 sys sys 1109511608 557
 rc/bin/pc - 20000000775 sys sys 960857447 0
 rc/bin/pc/bootfloppy - 775 sys sys 964455816 439
 rc/bin/pc/bootplan9 - 775 sys sys 960857446 1639
@@ -3078,7 +3079,7 @@ rc/bin/replica/defs - 664 sys sys 1103390458 778
 rc/bin/replica/pull - 775 sys sys 1045504036 1445
 rc/bin/replica/push - 775 sys sys 1043865725 361
 rc/bin/replica/scan - 775 sys sys 1089299188 472
-rc/bin/replica/setupdirs - 775 sys sys 1018321122 408
+rc/bin/replica/setupdirs - 775 sys sys 1109511315 411
 rc/bin/rwd - 775 sys sys 1042418590 349
 rc/bin/seemail - 775 sys sys 945617208 59
 rc/bin/service - 20000000775 sys sys 1018831800 0
@@ -3570,7 +3571,7 @@ sys/lib/dist/cmd/touchfs.c - 664 sys sys 1018469727 1120
 sys/lib/dist/cmd/unbflz.c - 664 sys sys 1018469727 1688
 sys/lib/dist/logcompress.awk - 664 sys sys 1068558028 298
 sys/lib/dist/logtime.awk - 664 sys sys 1019526213 38
-sys/lib/dist/mkfile - 664 sys sys 1104430715 3693
+sys/lib/dist/mkfile - 664 sys sys 1109511736 3842
 sys/lib/dist/pc - 20000000775 sys sys 1018721419 0
 sys/lib/dist/pc/empty - 20000000775 sys sys 1018469720 0
 sys/lib/dist/pc/emptyfile - 664 sys sys 1018469722 0
@@ -5528,7 +5529,7 @@ sys/src/9/port/page.c - 664 sys sys 1102133425 8281
 sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
 sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
-sys/src/9/port/portdat.h - 664 sys sys 1102093399 22207
+sys/src/9/port/portdat.h - 664 sys sys 1109541435 22233
 sys/src/9/port/portfns.h - 664 sys sys 1102093388 11474
 sys/src/9/port/portmkfile - 664 sys sys 1109202242 2043
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
@@ -7123,7 +7124,7 @@ sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1014925010 35895
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1048636613 905
 sys/src/cmd/aux/vga/neomagic.c - 664 sys sys 1104430499 8975
 sys/src/cmd/aux/vga/notes.txt - 664 sys sys 1028334647 14376
-sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1088204577 23412
+sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1109511456 23718
 sys/src/cmd/aux/vga/palette.c - 664 sys sys 1014925010 2201
 sys/src/cmd/aux/vga/pci.c - 664 sys sys 1014925011 8659
 sys/src/cmd/aux/vga/pci.h - 664 sys sys 1014925011 3290
@@ -10905,7 +10906,7 @@ sys/src/cmd/upas/send/authorize.c - 664 sys sys 944961322 569
 sys/src/cmd/upas/send/bind.c - 664 sys sys 944961322 3252
 sys/src/cmd/upas/send/cat_mail.c - 664 sys sys 1016904916 1190
 sys/src/cmd/upas/send/date - 664 sys sys 944961326 4665
-sys/src/cmd/upas/send/dest.c - 664 sys sys 1065717617 4732
+sys/src/cmd/upas/send/dest.c - 664 sys sys 1109511268 4789
 sys/src/cmd/upas/send/filter.c - 664 sys sys 988225293 2292
 sys/src/cmd/upas/send/gateway.c - 664 sys sys 944961322 499
 sys/src/cmd/upas/send/local.c - 664 sys sys 1031707305 2584
@@ -11049,7 +11050,7 @@ sys/src/cmd/venti/mkxml - 775 sys sys 1019678879 1078
 sys/src/cmd/venti/mkxml.elems - 775 sys sys 1019678880 786
 sys/src/cmd/venti/notes - 664 sys sys 1068500911 4032
 sys/src/cmd/venti/part.c - 664 sys sys 1036389637 2532
-sys/src/cmd/venti/printarena.c - 664 sys sys 1043805294 2557
+sys/src/cmd/venti/printarena.c - 664 sys sys 1109511493 2675
 sys/src/cmd/venti/rdarena.c - 664 sys sys 1055707432 1621
 sys/src/cmd/venti/read.c - 664 sys sys 1055707434 1723
 sys/src/cmd/venti/score.c - 664 sys sys 1045503655 588
@@ -12462,6 +12463,6 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 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/9loaddebug - 775 sys sys 1109477747 309905
-386/9loadlitedebug - 775 sys sys 1109477747 198992
-386/bin/8c - 775 sys sys 1109477746 358000
+386/bin/aux/vga - 775 sys sys 1109563697 301643
+386/bin/upas/filter - 775 sys sys 1109563698 147311
+386/bin/upas/send - 775 sys sys 1109563698 191536

+ 18 - 17
dist/replica/plan9.db

@@ -147,7 +147,7 @@
 386/bin/aux/tr2post - 775 sys sys 1104121987 176578
 386/bin/aux/trampoline - 775 sys sys 1104121988 83293
 386/bin/aux/typepasswd - 775 sys sys 1104121988 69503
-386/bin/aux/vga - 775 sys sys 1104562494 301461
+386/bin/aux/vga - 775 sys sys 1109563697 301643
 386/bin/aux/vmmousepoll - 775 sys sys 1032480572 41434
 386/bin/aux/vmware - 775 sys sys 1049428256 453
 386/bin/aux/vmwarefs - 775 sys sys 1095563640 99117
@@ -439,7 +439,7 @@
 386/bin/upas/aliasmail - 775 sys sys 1104122069 104752
 386/bin/upas/bayes - 775 sys sys 1064598344 70530
 386/bin/upas/deliver - 775 sys sys 1104122069 99781
-386/bin/upas/filter - 775 sys sys 1104122070 147311
+386/bin/upas/filter - 775 sys sys 1109563698 147311
 386/bin/upas/fs - 775 sys sys 1109132005 332256
 386/bin/upas/isspam - 775 sys sys 1064598349 38
 386/bin/upas/list - 775 sys sys 1104122071 82776
@@ -455,7 +455,7 @@
 386/bin/upas/ratfs - 775 sys sys 1108354565 111342
 386/bin/upas/runq - 775 sys sys 1104122074 113086
 386/bin/upas/scanmail - 775 sys sys 1104122075 128749
-386/bin/upas/send - 775 sys sys 1104122075 191536
+386/bin/upas/send - 775 sys sys 1109563698 191536
 386/bin/upas/smtp - 775 sys sys 1109132007 273564
 386/bin/upas/smtpd - 775 sys sys 1109132008 328719
 386/bin/upas/spam - 775 sys sys 1064598366 36
@@ -3042,16 +3042,17 @@ rc/bin/mousereset - 775 sys sys 1015089542 37
 rc/bin/nroff - 775 sys sys 945617208 27
 rc/bin/patch - 20000000775 sys sys 1067803227 0
 rc/bin/patch/applied - 775 sys sys 1081204295 110
-rc/bin/patch/apply - 775 sys sys 1089299188 1276
+rc/bin/patch/apply - 775 sys sys 1109511606 1285
 rc/bin/patch/create - 775 sys sys 1107957505 1404
-rc/bin/patch/diff - 775 sys sys 1106151131 466
-rc/bin/patch/email - 775 sys sys 1107836219 401
-rc/bin/patch/list - 775 sys sys 1107957885 696
-rc/bin/patch/move - 775 sys sys 1104430337 565
-rc/bin/patch/note - 664 sys sys 1089299189 655
-rc/bin/patch/okay - 775 sys sys 1087487682 242
+rc/bin/patch/diff - 775 sys sys 1109511606 474
+rc/bin/patch/email - 775 sys sys 1109511607 409
+rc/bin/patch/list - 775 sys sys 1109511607 704
+rc/bin/patch/move - 775 sys sys 1109511607 573
+rc/bin/patch/note - 664 sys sys 1109511607 663
+rc/bin/patch/okay - 775 sys sys 1109511608 250
+rc/bin/patch/remove - 775 sys sys 1109511608 285
 rc/bin/patch/sorry - 775 sys sys 1081200166 107
-rc/bin/patch/undo - 775 sys sys 1067804405 549
+rc/bin/patch/undo - 775 sys sys 1109511608 557
 rc/bin/pc - 20000000775 sys sys 960857447 0
 rc/bin/pc/bootfloppy - 775 sys sys 964455816 439
 rc/bin/pc/bootplan9 - 775 sys sys 960857446 1639
@@ -3078,7 +3079,7 @@ rc/bin/replica/defs - 664 sys sys 1103390458 778
 rc/bin/replica/pull - 775 sys sys 1045504036 1445
 rc/bin/replica/push - 775 sys sys 1043865725 361
 rc/bin/replica/scan - 775 sys sys 1089299188 472
-rc/bin/replica/setupdirs - 775 sys sys 1018321122 408
+rc/bin/replica/setupdirs - 775 sys sys 1109511315 411
 rc/bin/rwd - 775 sys sys 1042418590 349
 rc/bin/seemail - 775 sys sys 945617208 59
 rc/bin/service - 20000000775 sys sys 1018831800 0
@@ -3570,7 +3571,7 @@ sys/lib/dist/cmd/touchfs.c - 664 sys sys 1018469727 1120
 sys/lib/dist/cmd/unbflz.c - 664 sys sys 1018469727 1688
 sys/lib/dist/logcompress.awk - 664 sys sys 1068558028 298
 sys/lib/dist/logtime.awk - 664 sys sys 1019526213 38
-sys/lib/dist/mkfile - 664 sys sys 1104430715 3693
+sys/lib/dist/mkfile - 664 sys sys 1109511736 3842
 sys/lib/dist/pc - 20000000775 sys sys 1018721419 0
 sys/lib/dist/pc/empty - 20000000775 sys sys 1018469720 0
 sys/lib/dist/pc/emptyfile - 664 sys sys 1018469722 0
@@ -5528,7 +5529,7 @@ sys/src/9/port/page.c - 664 sys sys 1102133425 8281
 sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
 sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
-sys/src/9/port/portdat.h - 664 sys sys 1102093399 22207
+sys/src/9/port/portdat.h - 664 sys sys 1109541435 22233
 sys/src/9/port/portfns.h - 664 sys sys 1102093388 11474
 sys/src/9/port/portmkfile - 664 sys sys 1109202242 2043
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
@@ -7123,7 +7124,7 @@ sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1014925010 35895
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1048636613 905
 sys/src/cmd/aux/vga/neomagic.c - 664 sys sys 1104430499 8975
 sys/src/cmd/aux/vga/notes.txt - 664 sys sys 1028334647 14376
-sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1088204577 23412
+sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1109511456 23718
 sys/src/cmd/aux/vga/palette.c - 664 sys sys 1014925010 2201
 sys/src/cmd/aux/vga/pci.c - 664 sys sys 1014925011 8659
 sys/src/cmd/aux/vga/pci.h - 664 sys sys 1014925011 3290
@@ -10905,7 +10906,7 @@ sys/src/cmd/upas/send/authorize.c - 664 sys sys 944961322 569
 sys/src/cmd/upas/send/bind.c - 664 sys sys 944961322 3252
 sys/src/cmd/upas/send/cat_mail.c - 664 sys sys 1016904916 1190
 sys/src/cmd/upas/send/date - 664 sys sys 944961326 4665
-sys/src/cmd/upas/send/dest.c - 664 sys sys 1065717617 4732
+sys/src/cmd/upas/send/dest.c - 664 sys sys 1109511268 4789
 sys/src/cmd/upas/send/filter.c - 664 sys sys 988225293 2292
 sys/src/cmd/upas/send/gateway.c - 664 sys sys 944961322 499
 sys/src/cmd/upas/send/local.c - 664 sys sys 1031707305 2584
@@ -11049,7 +11050,7 @@ sys/src/cmd/venti/mkxml - 775 sys sys 1019678879 1078
 sys/src/cmd/venti/mkxml.elems - 775 sys sys 1019678880 786
 sys/src/cmd/venti/notes - 664 sys sys 1068500911 4032
 sys/src/cmd/venti/part.c - 664 sys sys 1036389637 2532
-sys/src/cmd/venti/printarena.c - 664 sys sys 1043805294 2557
+sys/src/cmd/venti/printarena.c - 664 sys sys 1109511493 2675
 sys/src/cmd/venti/rdarena.c - 664 sys sys 1055707432 1621
 sys/src/cmd/venti/read.c - 664 sys sys 1055707434 1723
 sys/src/cmd/venti/score.c - 664 sys sys 1045503655 588

+ 18 - 0
dist/replica/plan9.log

@@ -13824,3 +13824,21 @@
 1109478642 0 c 386/9loaddebug - 775 sys sys 1109477747 309905
 1109478642 1 c 386/9loadlitedebug - 775 sys sys 1109477747 198992
 1109478642 2 c 386/bin/8c - 775 sys sys 1109477746 358000
+1109512850 0 c rc/bin/patch/apply - 775 sys sys 1109511606 1285
+1109512850 1 c rc/bin/patch/diff - 775 sys sys 1109511606 474
+1109512850 2 c rc/bin/patch/email - 775 sys sys 1109511607 409
+1109512850 3 c rc/bin/patch/list - 775 sys sys 1109511607 704
+1109512850 4 c rc/bin/patch/move - 775 sys sys 1109511607 573
+1109512850 5 c rc/bin/patch/note - 664 sys sys 1109511607 663
+1109512850 6 c rc/bin/patch/okay - 775 sys sys 1109511608 250
+1109512850 7 a rc/bin/patch/remove - 775 sys sys 1109511608 285
+1109512850 8 c rc/bin/patch/undo - 775 sys sys 1109511608 557
+1109512850 9 c rc/bin/replica/setupdirs - 775 sys sys 1109511315 411
+1109512850 10 c sys/lib/dist/mkfile - 664 sys sys 1109511736 3842
+1109512850 11 c sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1109511456 23718
+1109512850 12 c sys/src/cmd/upas/send/dest.c - 664 sys sys 1109511268 4789
+1109512850 13 c sys/src/cmd/venti/printarena.c - 664 sys sys 1109511493 2675
+1109541655 0 c sys/src/9/port/portdat.h - 664 sys sys 1109541435 22233
+1109565060 0 c 386/bin/aux/vga - 775 sys sys 1109563697 301643
+1109565060 1 c 386/bin/upas/filter - 775 sys sys 1109563698 147311
+1109565060 2 c 386/bin/upas/send - 775 sys sys 1109563698 191536

+ 2 - 0
rc/bin/patch/apply

@@ -1,5 +1,7 @@
 #!/bin/rc
 
+rfork e
+
 if(! ~ $#* 1){
 	echo 'usage: patch/apply patch-name' >[1=2]
 	exit usage

+ 1 - 0
rc/bin/patch/diff

@@ -1,5 +1,6 @@
 #!/bin/rc
 
+rfork e
 if(! ~ $#* 1){
 	echo 'usage: patch/diff patch-name' >[1=2]
 	exit usage

+ 1 - 0
rc/bin/patch/email

@@ -1,5 +1,6 @@
 #!/bin/rc
 
+rfork e
 if(! ~ $#* 2){
 	echo 'usage: patch/email name email-address' >[1=2]
 	exit usage

+ 1 - 0
rc/bin/patch/list

@@ -1,5 +1,6 @@
 #!/bin/rc
 
+rfork e
 if(! test -d /n/sources/patch){
 	rfork n
 	9fs sources

+ 1 - 0
rc/bin/patch/move

@@ -1,5 +1,6 @@
 #!/bin/rc
 
+rfork e
 if(~ $#* 0 1){
 	echo 'usage: patch/move dst patch-name...' >[1=2]
 	exit usage

+ 1 - 0
rc/bin/patch/note

@@ -1,5 +1,6 @@
 #!/bin/rc
 
+rfork e
 if(! ~ $#* 1){
 	echo 'usage: patch/note patch-name' >[1=2]
 	exit usage

+ 1 - 0
rc/bin/patch/okay

@@ -1,5 +1,6 @@
 #!/bin/rc
 
+rfork e
 if(! ~ $#* 1){
 	echo usage: patch/okay dir >[1=2]
 	exit usage

+ 19 - 0
rc/bin/patch/remove

@@ -0,0 +1,19 @@
+#!/bin/rc
+
+rfork e
+if(~ $#* 0){
+	echo 'usage: patch/remove patch-name...' >[1=2]
+	exit usage
+}
+
+if(! test -d /n/sources/patch){
+	rfork n
+	9fs sources
+}
+
+for(i){
+	if(! test -d /n/sources/patch/$i)
+		echo 'no such patch' /n/sources/patch/$i >[1=2]
+	if not
+		rm -rf /n/sources/patch/$i
+}

+ 1 - 0
rc/bin/patch/undo

@@ -1,5 +1,6 @@
 #!/bin/rc
 
+rfork e
 if(! ~ $#* 1){
 	echo 'usage: patch/undo patch-name' >[1=2]
 	exit usage

+ 1 - 1
rc/bin/replica/setupdirs

@@ -30,5 +30,5 @@ for (i in \
 	$libreplica/log\
 	$libreplica/cfg)
 	if(! test -d $i)
-		must mkdir $i
+		must mkdir -p $i
 

+ 2 - 1
sys/lib/dist/mkfile

@@ -14,7 +14,7 @@ cd-dist:V: /n/fsother/dist/plan9.iso.bz2
 contrib-cd:V:	/n/fsother/dist/contrib.iso.bz2
 
 /n/fsother/dist/%.iso:D: /n/sources/plan9/dist/replica/plan9.log
-	#@{cd pc; mk cddisk; cd ..}
+	@{cd pc; mk cddisk; cd ..}
 	rm -f $target
 	bind pc/cddisk cdstub/bootdisk.img
 	if(! test -f $d/bootdisk.img)
@@ -91,6 +91,7 @@ reencode:V:
 	{mv /n/fsother/dist/$stem.iso.bz2 /n/fsother/dist/_$stem.iso.bz2
 	mv /n/fsother/dist/n$stem.iso.bz2 /n/fsother/dist/$stem.iso.bz2
 	}
+	echo `{date} md5 `{md5sum </n/fsother/dist/$stem.iso.bz2} sha1 `{sha1sum </n/fsother/dist/$stem.iso.bz2} $stem.iso.bz2 >>/usr/web/plan9checksums.txt
 
 /n/fsother/dist/contrib.iso:DV:
 	rm -f $target

+ 1 - 0
sys/src/9/port/portdat.h

@@ -960,3 +960,4 @@ enum
 #pragma	varargck	type	"M"	uchar*
 #pragma	varargck	type	"p"	void*
 #pragma	varargck	type	"q"	char*
+#pragma varargck	flag	','

+ 15 - 1
sys/src/cmd/aux/vga/nvidia.c

@@ -92,6 +92,8 @@ struct Nvidia {
 	ulong	dither;
 
 	int	islcd;
+	int	fpwidth;
+	int	fpheight;
 	int	twoheads;
 	int	twostagepll;
 	int	crtcnumber;
@@ -266,8 +268,14 @@ snarf(Vga* vga, Ctlr* ctlr)
 			nv->dither = nv->pramdac[0x083C/4];
 	}
 
-	if (nv->pixel & 0x80)
+	/*
+	 * DFP.
+	 */
+	if (nv->pixel & 0x80){
 		nv->islcd = 1;
+       		nv->fpwidth = nv->pramdac[0x0820/4] + 1;
+       		nv->fpheight = nv->pramdac[0x0800/4] + 1;
+	}
 
 	nv->crtcnumber = 0;
 
@@ -875,6 +883,12 @@ dump(Vga* vga, Ctlr* ctlr)
 	Bprint(&stdout, " %d\n", nv->twostagepll);
 	printitem(ctlr->name, "crtcnumber");
 	Bprint(&stdout, " %d\n", nv->crtcnumber);
+
+	printitem(ctlr->name, "fpwidth");
+	Bprint(&stdout, " %d\n", nv->fpwidth);
+	printitem(ctlr->name, "fpheight");
+	Bprint(&stdout, " %d\n", nv->fpheight);
+
 }
 
 

+ 1 - 1
sys/src/cmd/upas/send/dest.c

@@ -180,7 +180,7 @@ d_to(dest *list)
 			if(strncmp(cp, "local!", 6) == 0)
 				cp += 6;
 
-			if(n > 40){
+			if(n > 20){	/* 20 to appease mailers complaining about long lines */
 				s_append(s, "\n\t");
 				n = 0;
 			}

+ 6 - 1
sys/src/cmd/venti/printarena.c

@@ -2,6 +2,7 @@
 #include "dat.h"
 #include "fns.h"
 
+int wanttype;
 int readonly = 1;	/* for part.c */
 
 void
@@ -57,7 +58,8 @@ rdArena(Arena *arena, u64int offset)
 				break;
 			}
 		}
-		print("%V %d\n", score, cl.info.type);
+		if(wanttype == 0 || cl.info.type == wanttype)
+			print("%V %d\n", score, cl.info.type);
 		freeZBlock(lump);
 	}
 	print("end offset %llud\n", aa);
@@ -76,6 +78,9 @@ main(int argc, char *argv[])
 
 	aoffset = 0;
 	ARGBEGIN{
+	case 't':
+		wanttype = atoi(EARGF(usage()));
+		break;
 	case 'o':
 		aoffset = strtoull(EARGF(usage()), 0, 0);
 		break;