Browse Source

Plan 9 from Bell Labs 2006-05-04

David du Colombier 18 years ago
parent
commit
b605a0c378

+ 9 - 9
dist/replica/_plan9.db

@@ -14367,7 +14367,7 @@ sys/src/fs/pc/8253.c - 664 sys sys 1097579039 7264
 sys/src/fs/pc/cga.c - 664 sys sys 1015110034 1484
 sys/src/fs/pc/compat.c - 664 sys sys 1140164905 1575
 sys/src/fs/pc/compat.h - 664 sys sys 1140167957 2426
-sys/src/fs/pc/dosfs.c - 664 sys sys 1097712365 16637
+sys/src/fs/pc/dosfs.c - 664 sys sys 1146675982 16443
 sys/src/fs/pc/dosfs.h - 664 sys sys 1140167937 2696
 sys/src/fs/pc/ether2114x.c - 664 sys sys 1015110044 31874
 sys/src/fs/pc/ether8139.c - 664 sys sys 1086569718 18552
@@ -14376,7 +14376,7 @@ sys/src/fs/pc/ether83815.c - 664 sys sys 1140335463 26764
 sys/src/fs/pc/ether83815.mii.c - 664 sys sys 1049156663 31622
 sys/src/fs/pc/etherdp83820.c - 664 sys sys 1092268058 30976
 sys/src/fs/pc/etherelnk3.c - 664 sys sys 1015110054 42732
-sys/src/fs/pc/etherga620.c - 664 sys sys 1140166315 24732
+sys/src/fs/pc/etherga620.c - 664 sys sys 1146675981 24749
 sys/src/fs/pc/etherga620fw.h - 664 sys sys 1032126775 222295
 sys/src/fs/pc/etherif.c - 664 sys sys 1140162742 6375
 sys/src/fs/pc/etherif.h - 664 sys sys 1015110057 730
@@ -14391,12 +14391,12 @@ sys/src/fs/pc/malloc.c - 664 sys sys 1096789023 2840
 sys/src/fs/pc/mkfile - 664 sys sys 1140167942 426
 sys/src/fs/pc/mmu.c - 664 sys sys 1015110065 8414
 sys/src/fs/pc/nvr.c - 664 sys sys 1015110066 669
-sys/src/fs/pc/pc.c - 664 sys sys 1140167943 7985
+sys/src/fs/pc/pc.c - 664 sys sys 1146675981 7949
 sys/src/fs/pc/pci.c - 664 sys sys 1094949424 12118
 sys/src/fs/pc/script.i - 664 sys sys 1015110072 27323
 sys/src/fs/pc/scsi.c - 664 sys sys 1091803674 8661
 sys/src/fs/pc/scsibuslogic.c - 664 sys sys 1015110077 28645
-sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1112488792 53673
+sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1146675981 53427
 sys/src/fs/pc/sdata.c - 664 sys sys 1097712291 61793
 sys/src/fs/pc/sdscsi.c - 664 sys sys 1140164880 7042
 sys/src/fs/pc/toy.c - 664 sys sys 1140167948 2166
@@ -14405,19 +14405,19 @@ sys/src/fs/port - 20000000775 sys sys 1015110029 0
 sys/src/fs/port/9p1.c - 664 sys sys 1140167971 29982
 sys/src/fs/port/9p1.h - 664 sys sys 1140167972 2128
 sys/src/fs/port/9p1lib.c - 664 sys sys 1101627232 7911
-sys/src/fs/port/9p2.c - 664 sys sys 1098094593 36248
+sys/src/fs/port/9p2.c - 664 sys sys 1146675939 36160
 sys/src/fs/port/all.h - 664 sys sys 1140167977 1932
-sys/src/fs/port/auth.c - 664 sys sys 1097573906 7609
+sys/src/fs/port/auth.c - 664 sys sys 1146675939 7605
 sys/src/fs/port/chk.c - 664 sys sys 1097832483 15683
 sys/src/fs/port/clock.c - 664 sys sys 1097580538 4033
-sys/src/fs/port/con.c - 664 sys sys 1097580641 16327
+sys/src/fs/port/con.c - 664 sys sys 1146675938 16231
 sys/src/fs/port/config.c - 664 sys sys 1107835943 20264
 sys/src/fs/port/console.c - 664 sys sys 1101627646 4886
 sys/src/fs/port/data.c - 664 sys sys 1140167986 4510
 sys/src/fs/port/dentry.c - 664 sys sys 1098156404 6345
 sys/src/fs/port/devcons.c - 664 sys sys 1095983755 4451
 sys/src/fs/port/devsd.c - 664 sys sys 1097712378 10993
-sys/src/fs/port/fcmd.c - 664 sys sys 1015110015 1266
+sys/src/fs/port/fcmd.c - 664 sys sys 1146675938 1255
 sys/src/fs/port/fs.h - 664 sys sys 1140168001 682
 sys/src/fs/port/iobuf.c - 664 sys sys 1140167988 4956
 sys/src/fs/port/lib.h - 664 sys sys 1091960844 3701
@@ -14429,7 +14429,7 @@ sys/src/fs/port/portfns.h - 664 sys sys 1140167994 7526
 sys/src/fs/port/print.c - 664 sys sys 1015110022 153
 sys/src/fs/port/proc.c - 664 sys sys 1097580775 5364
 sys/src/fs/port/sd.h - 664 sys sys 1097577251 2167
-sys/src/fs/port/sub.c - 664 sys sys 1098157264 25628
+sys/src/fs/port/sub.c - 664 sys sys 1146675938 23732
 sys/src/fs/port/time.c - 664 sys sys 1140167998 6222
 sys/src/fs/port/uidgid.c - 664 sys sys 1097574050 9192
 sys/src/games - 20000000775 sys sys 1095792091 0

+ 9 - 9
dist/replica/plan9.db

@@ -14367,7 +14367,7 @@ sys/src/fs/pc/8253.c - 664 sys sys 1097579039 7264
 sys/src/fs/pc/cga.c - 664 sys sys 1015110034 1484
 sys/src/fs/pc/compat.c - 664 sys sys 1140164905 1575
 sys/src/fs/pc/compat.h - 664 sys sys 1140167957 2426
-sys/src/fs/pc/dosfs.c - 664 sys sys 1097712365 16637
+sys/src/fs/pc/dosfs.c - 664 sys sys 1146675982 16443
 sys/src/fs/pc/dosfs.h - 664 sys sys 1140167937 2696
 sys/src/fs/pc/ether2114x.c - 664 sys sys 1015110044 31874
 sys/src/fs/pc/ether8139.c - 664 sys sys 1086569718 18552
@@ -14376,7 +14376,7 @@ sys/src/fs/pc/ether83815.c - 664 sys sys 1140335463 26764
 sys/src/fs/pc/ether83815.mii.c - 664 sys sys 1049156663 31622
 sys/src/fs/pc/etherdp83820.c - 664 sys sys 1092268058 30976
 sys/src/fs/pc/etherelnk3.c - 664 sys sys 1015110054 42732
-sys/src/fs/pc/etherga620.c - 664 sys sys 1140166315 24732
+sys/src/fs/pc/etherga620.c - 664 sys sys 1146675981 24749
 sys/src/fs/pc/etherga620fw.h - 664 sys sys 1032126775 222295
 sys/src/fs/pc/etherif.c - 664 sys sys 1140162742 6375
 sys/src/fs/pc/etherif.h - 664 sys sys 1015110057 730
@@ -14391,12 +14391,12 @@ sys/src/fs/pc/malloc.c - 664 sys sys 1096789023 2840
 sys/src/fs/pc/mkfile - 664 sys sys 1140167942 426
 sys/src/fs/pc/mmu.c - 664 sys sys 1015110065 8414
 sys/src/fs/pc/nvr.c - 664 sys sys 1015110066 669
-sys/src/fs/pc/pc.c - 664 sys sys 1140167943 7985
+sys/src/fs/pc/pc.c - 664 sys sys 1146675981 7949
 sys/src/fs/pc/pci.c - 664 sys sys 1094949424 12118
 sys/src/fs/pc/script.i - 664 sys sys 1015110072 27323
 sys/src/fs/pc/scsi.c - 664 sys sys 1091803674 8661
 sys/src/fs/pc/scsibuslogic.c - 664 sys sys 1015110077 28645
-sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1112488792 53673
+sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1146675981 53427
 sys/src/fs/pc/sdata.c - 664 sys sys 1097712291 61793
 sys/src/fs/pc/sdscsi.c - 664 sys sys 1140164880 7042
 sys/src/fs/pc/toy.c - 664 sys sys 1140167948 2166
@@ -14405,19 +14405,19 @@ sys/src/fs/port - 20000000775 sys sys 1015110029 0
 sys/src/fs/port/9p1.c - 664 sys sys 1140167971 29982
 sys/src/fs/port/9p1.h - 664 sys sys 1140167972 2128
 sys/src/fs/port/9p1lib.c - 664 sys sys 1101627232 7911
-sys/src/fs/port/9p2.c - 664 sys sys 1098094593 36248
+sys/src/fs/port/9p2.c - 664 sys sys 1146675939 36160
 sys/src/fs/port/all.h - 664 sys sys 1140167977 1932
-sys/src/fs/port/auth.c - 664 sys sys 1097573906 7609
+sys/src/fs/port/auth.c - 664 sys sys 1146675939 7605
 sys/src/fs/port/chk.c - 664 sys sys 1097832483 15683
 sys/src/fs/port/clock.c - 664 sys sys 1097580538 4033
-sys/src/fs/port/con.c - 664 sys sys 1097580641 16327
+sys/src/fs/port/con.c - 664 sys sys 1146675938 16231
 sys/src/fs/port/config.c - 664 sys sys 1107835943 20264
 sys/src/fs/port/console.c - 664 sys sys 1101627646 4886
 sys/src/fs/port/data.c - 664 sys sys 1140167986 4510
 sys/src/fs/port/dentry.c - 664 sys sys 1098156404 6345
 sys/src/fs/port/devcons.c - 664 sys sys 1095983755 4451
 sys/src/fs/port/devsd.c - 664 sys sys 1097712378 10993
-sys/src/fs/port/fcmd.c - 664 sys sys 1015110015 1266
+sys/src/fs/port/fcmd.c - 664 sys sys 1146675938 1255
 sys/src/fs/port/fs.h - 664 sys sys 1140168001 682
 sys/src/fs/port/iobuf.c - 664 sys sys 1140167988 4956
 sys/src/fs/port/lib.h - 664 sys sys 1091960844 3701
@@ -14429,7 +14429,7 @@ sys/src/fs/port/portfns.h - 664 sys sys 1140167994 7526
 sys/src/fs/port/print.c - 664 sys sys 1015110022 153
 sys/src/fs/port/proc.c - 664 sys sys 1097580775 5364
 sys/src/fs/port/sd.h - 664 sys sys 1097577251 2167
-sys/src/fs/port/sub.c - 664 sys sys 1098157264 25628
+sys/src/fs/port/sub.c - 664 sys sys 1146675938 23732
 sys/src/fs/port/time.c - 664 sys sys 1140167998 6222
 sys/src/fs/port/uidgid.c - 664 sys sys 1097574050 9192
 sys/src/games - 20000000775 sys sys 1095792091 0

+ 9 - 0
dist/replica/plan9.log

@@ -29597,3 +29597,12 @@
 1146339069 2 c 386/bin/strings - 775 sys sys 1146338540 62457
 1146544209 0 c sys/src/9/pc/mp.c - 664 sys sys 1146542974 17317
 1146583821 0 c sys/man/6/utf - 664 sys sys 1146582112 2430
+1146677452 0 c sys/src/fs/pc/dosfs.c - 664 sys sys 1146675982 16443
+1146677452 1 c sys/src/fs/pc/etherga620.c - 664 sys sys 1146675981 24749
+1146677452 2 c sys/src/fs/pc/pc.c - 664 sys sys 1146675981 7949
+1146677452 3 c sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1146675981 53427
+1146677452 4 c sys/src/fs/port/9p2.c - 664 sys sys 1146675939 36160
+1146677452 5 c sys/src/fs/port/auth.c - 664 sys sys 1146675939 7605
+1146677452 6 c sys/src/fs/port/con.c - 664 sys sys 1146675938 16231
+1146677452 7 c sys/src/fs/port/fcmd.c - 664 sys sys 1146675938 1255
+1146677452 8 c sys/src/fs/port/sub.c - 664 sys sys 1146675938 23732

+ 30 - 33
sys/src/fs/pc/dosfs.c

@@ -24,7 +24,7 @@ struct Clustbuf
 {
 	int	flags;
 	int	age;
-	Devsize	sector;
+	long	sector;
 	uchar *	iobuf;
 	Dos *	dos;
 	int	size;
@@ -50,12 +50,11 @@ static void
 writeclust(Clustbuf *p)
 {
 	Dos *dos;
-	Off addr;
+	int addr;
 
 	dos = p->dos;
 	addr = (p->sector+dos->start)*dos->sectbytes;
-	chat("writeclust @ %lld addr %lld...", (Wideoff)p->sector,
-		(Wideoff)addr);
+	chat("writeclust @ %ld addr %d...", p->sector, addr);
 	if((*dos->seek)(dos->dev, addr) < 0)
 		panic("writeclust: seek");
 	if((*dos->write)(dos->dev, p->iobuf, p->size) != p->size)
@@ -84,11 +83,11 @@ syncclust(void)
  *  get an io buffer, possibly with valid data
  */
 static Clustbuf*
-getclust0(Dos *dos, Off sector)
+getclust0(Dos *dos, long sector)
 {
 	Clustbuf *p, *oldest;
 
-	chat("getclust0 @ %lld\n", (Wideoff)sector);
+	chat("getclust0 @ %ld\n", sector);
 
 	/*
 	 *  if we have it, just return it
@@ -99,7 +98,7 @@ getclust0(Dos *dos, Off sector)
 		if(sector == p->sector && dos == p->dos){
 			if(p->flags & LOCKED)
 				panic("getclust0 locked");
-			chat("getclust0 %lld in cache\n", (Wideoff)sector);
+			chat("getclust0 %ld in cache\n", sector);
 			p->flags |= LOCKED;
 			return p;
 		}
@@ -134,10 +133,10 @@ getclust0(Dos *dos, Off sector)
  *  get an io block from an io buffer
  */
 static Clustbuf*
-getclust(Dos *dos, Off sector)
+getclust(Dos *dos, long sector)
 {
 	Clustbuf *p;
-	Off addr;
+	int addr;
 
 	p = getclust0(dos, sector);
 	if(p->dos){
@@ -145,12 +144,12 @@ getclust(Dos *dos, Off sector)
 		return p;
 	}
 	addr = (sector+dos->start)*dos->sectbytes;
-	chat("getclust seek addr %lld\n", (Wideoff)addr);
+	chat("getclust seek addr %d\n", addr);
 	if((*dos->seek)(dos->dev, addr) < 0){
 		chat("can't seek block\n");
 		return 0;
 	}
-	chat("getclust read addr %lld\n", (Wideoff)addr);
+	chat("getclust read addr %d\n", addr);
 	if((*dos->read)(dos->dev, p->iobuf, p->size) != p->size){
 		chat("can't read block\n");
 		return 0;
@@ -159,7 +158,7 @@ getclust(Dos *dos, Off sector)
 	p->age = MACHP(0)->ticks;
 	p->dos = dos;
 	p->sector = sector;
-	chat("getclust %lld read\n", (Wideoff)sector);
+	chat("getclust %ld read\n", sector);
 	return p;
 }
 
@@ -168,7 +167,7 @@ getclust(Dos *dos, Off sector)
  *  any current data is discarded.
  */
 static Clustbuf*
-getclustz(Dos *dos, Off sector)
+getclustz(Dos *dos, long sector)
 {
 	Clustbuf *p;
 
@@ -178,7 +177,7 @@ getclustz(Dos *dos, Off sector)
 	p->sector = sector;
 	memset(p->iobuf, 0, p->size);
 	p->flags |= MOD;
-	chat("getclustz %lld\n", (Wideoff)sector);
+	chat("getclustz %ld\n", sector);
 	return p;
 }
 
@@ -193,7 +192,7 @@ putclust(Clustbuf *p)
 	if((p->flags & (MOD|IMMED)) == (MOD|IMMED))
 		writeclust(p);
 	p->flags &= ~LOCKED;
-	chat("putclust @ sector %lld...", (Wideoff)p->sector);
+	chat("putclust @ sector %ld...", p->sector);
 }
 
 /*
@@ -253,7 +252,7 @@ fatwalk(Dos *dos, int n)
 static void
 fatwrite(Dos *dos, int n, int val)
 {
-	Off k, sect;
+	ulong k, sect;
 	Clustbuf *p;
 	int i, o;
 
@@ -344,13 +343,13 @@ fatalloc(Dos *dos)
  *  map a file's logical sector address to a physical sector address
  */
 static long
-fileaddr(Dosfile *fp, Off ltarget, Clustbuf *pdir)
+fileaddr(Dosfile *fp, long ltarget, Clustbuf *pdir)
 {
 	Dos *dos = fp->dos;
 	Dosdir *dp;
-	Off p;
+	long p;
 
-	chat("fileaddr %8.8s %lld\n", fp->name, (Wideoff)ltarget);
+	chat("fileaddr %8.8s %ld\n", fp->name, ltarget);
 	/*
 	 *  root directory is contiguous and easy
 	 */
@@ -358,7 +357,7 @@ fileaddr(Dosfile *fp, Off ltarget, Clustbuf *pdir)
 		if(ltarget*dos->sectbytes >= dos->rootsize*sizeof(Dosdir))
 			return -1;
 		p = dos->rootaddr + ltarget;
-		chat("fileaddr %lld -> %lld\n", (Wideoff)ltarget, (Wideoff)p);
+		chat("fileaddr %ld -> %ld\n", ltarget, p);
 		return p;
 	}
 	if(fp->pstart == 0){	/* empty file */
@@ -367,7 +366,7 @@ fileaddr(Dosfile *fp, Off ltarget, Clustbuf *pdir)
 		p = fatalloc(dos);
 		if(p <= 0)
 			return -1;
-		chat("fileaddr initial alloc %lld\n", (Wideoff)p);
+		chat("fileaddr initial alloc %ld\n", p);
 		dp = (Dosdir *)(pdir->iobuf + fp->odir);
 		puttime(dp);
 		dp->start[0] = p;
@@ -408,7 +407,7 @@ fileaddr(Dosfile *fp, Off ltarget, Clustbuf *pdir)
 	 *  clusters start at 2 instead of 0 (why? - presotto)
 	 */
 	p = dos->dataaddr + (fp->pcurrent-2)*dos->clustsize;
-	chat("fileaddr %lld -> %lld\n", (Wideoff)ltarget, (Wideoff)p);
+	chat("fileaddr %ld -> %ld\n", ltarget, p);
 	return p;
 }
 
@@ -457,7 +456,7 @@ doswalk(Dosfile *fp, char *name)
 	char dname[8], dext[3];
 	Clustbuf *p;
 	Dosdir *dp;
-	Off o, addr;
+	long o, addr;
 
 	if((fp->attr & DOSDIR) == 0){
 		chat("walking non-directory!\n");
@@ -485,7 +484,7 @@ doswalk(Dosfile *fp, char *name)
 		fp->offset += p->size;
 		putclust(p);
 	}
-	panic("doswalk");
+
 Found:
 	fp->pdir = p->sector;
 	fp->odir = o;
@@ -636,8 +635,7 @@ dosinit(Dos *dos)
 	dos->root.attr = DOSDIR;
 	dos->root.length = dos->rootsize*sizeof(Dosdir);
 	dos->root.pstart = 0;
-	dos->root.lcurrent = 0;
-	dos->root.pcurrent = 0;
+	dos->root.pcurrent = dos->root.lcurrent = 0;
 	dos->root.offset = 0;
 
 	syncclust();
@@ -667,7 +665,7 @@ nextelem(char *path, char *elem)
 static void
 puttime(Dosdir *d)
 {
-	Timet secs;
+	ulong secs;
 	Rtc rtc;
 	ushort x;
 
@@ -696,9 +694,8 @@ dosopen(Dos *dos, char *path, Dosfile *fp)
 			print("%s not found\n", element);
 			return 0;
 		case 1:
-			print("found %s attr 0x%ux start 0x%llux len %lld\n",
-				element, fp->attr, (Wideoff)fp->pstart,
-				(Wideoff)fp->length);
+			print("found %s attr 0x%ux start 0x%lux len %ld\n",
+				element, fp->attr, fp->pstart, fp->length);
 			break;
 		}
 	}
@@ -713,7 +710,7 @@ dosopen(Dos *dos, char *path, Dosfile *fp)
 long
 dosread(Dosfile *fp, void *a, long n)
 {
-	Off addr, k, o;
+	long addr, k, o;
 	Clustbuf *p;
 	uchar *to;
 
@@ -758,7 +755,7 @@ dosread(Dosfile *fp, void *a, long n)
 long
 doswrite(Dosfile *fp, void *a, long n)
 {
-	Off blksize, addr, k, o;
+	long blksize, addr, k, o;
 	Clustbuf *p, *pdir;
 	Dosdir *dp;
 	uchar *from;
@@ -828,7 +825,7 @@ dostrunc(Dosfile *fp)
 {
 	Clustbuf *pdir;
 	Dosdir *dp;
-	Off p, np;
+	int p, np;
 
 	if(fp->attr & DOSDIR){
 		print("trunc dir\n");

+ 8 - 8
sys/src/fs/pc/etherga620.c

@@ -473,7 +473,7 @@ ga620interrupt(Ureg*, void* arg)
 			return;
 	}
 	if(DoCountTicks)
-		cycles(&tsc0);
+		rdtsc(&tsc0);
 
 	ctlr->interrupts++;
 	csr32w(ctlr, Hi, 1);
@@ -493,7 +493,7 @@ ga620interrupt(Ureg*, void* arg)
 	csr32w(ctlr, Hi, 0);
 
 	if(DoCountTicks){
-		cycles(&tsc1);
+		rdtsc(&tsc1);
 		ctlr->ticks += tsc1-tsc0;
 	}
 }
@@ -603,9 +603,9 @@ ga620init(Ether* edev)
 	sethost64(&ctlr->gib->srcb.addr, ctlr->sr);
 	if(DoHardwareCksum)
 		flags = TcpUdpCksum|NoPseudoHdrCksum|HostRing;
-	else
+	else 
 		flags = HostRing;
-	if(DoCoalUpdateOnly)
+	if(DoCoalUpdateOnly) 
 		flags |= CoalUpdateOnly;
 	ctlr->gib->srcb.control = (Nsr<<16)|flags;
 	sethost64(&ctlr->gib->scp, ctlr->sci);
@@ -693,7 +693,7 @@ ga620init(Ether* edev)
 	 * A unique index for this controller and the maximum packet
 	 * length expected.
 	 * For now only standard packets are expected.
-	 */
+	 */ 
 	csr32w(ctlr, Ifx, 1);
 	csr32w(ctlr, IfMTU, ETHERMAXTU+4);
 
@@ -879,7 +879,7 @@ ga620detach(Ctlr* ctlr)
 static int
 ga620reset(Ctlr* ctlr)
 {
-	int cls, csr, i, b;
+	int cls, csr, data, i;
 
 	if(ga620detach(ctlr) < 0)
 		return -1;
@@ -918,9 +918,9 @@ ga620reset(Ctlr* ctlr)
 	 * Snarf the MAC address from the serial EEPROM.
 	 */
 	for(i = 0; i < Easize; i++){
-		if((b = at24c32r(ctlr, 0x8E+i)) == -1)
+		if((data = at24c32r(ctlr, 0x8E+i)) == -1)
 			return -1;
-		ctlr->ea[i] = b;
+		ctlr->ea[i] = data & 0xFF;
 	}
 
 	/*

+ 3 - 2
sys/src/fs/pc/pc.c

@@ -118,7 +118,7 @@ cistrcmp(char* a, char* b)
 	for(;;){
 		ac = *a++;
 		bc = *b++;
-
+	
 		if(ac >= 'A' && ac <= 'Z')
 			ac = 'a' + (ac - 'A');
 		if(bc >= 'A' && bc <= 'Z')
@@ -170,7 +170,7 @@ getconf(char *name)
 
 /* memory map */
 /* the file server kernel will only see MAXMEG megabytes of RAM at most.  */
-#define MAXMEG 1791		/* 1.75GB-1MB, to avoid overshooting 1.75GB */
+#define MAXMEG 1024
 
 char mmap[MAXMEG+2];
 Mconf mconf;
@@ -309,6 +309,7 @@ pcgetc(void)
 		return c;
 	if(useuart)
 		return uartgetc();
+	return 0;
 }
 
 static void

+ 40 - 42
sys/src/fs/pc/scsincr53c8xx.c

@@ -13,7 +13,7 @@
  * Read/write mismatch recovery may fail on 53c1010s. Really need to get a manual.
 */
 
-#define MAXTARGET	16		/* can be 8 or 16 */
+#define MAXTARGET	8		/* can be 8 or 16 */
 
 /* Define one or the other ... */
 //#define CPU
@@ -187,7 +187,7 @@ typedef struct Ncr {
 	uchar dcntl;
 
 	uchar adder[4];	/* 3c */
-
+	
 	uchar sien0;	/* 40 */
 	uchar sien1;
 	uchar sist0;
@@ -421,7 +421,7 @@ oprint(char *format, ...)
 		debuglast = debugbuf;
 	debuglast = doprint(debuglast, debugbuf + (DEBUGSIZE - 1), format, (&format + 1));
 	splx(s);
-	iflush();
+	iflush();	
 }
 #endif
 
@@ -510,7 +510,7 @@ dumpncrregs(Controller *c, int intr)
 		else
 			KPRINT("\n");
 	}
-}
+}	
 
 static int
 chooserate(Controller *c, int tpf, int *scfp, int *xferpp)
@@ -830,7 +830,7 @@ softreset(Controller *c)
 
 	n->stime0 = 0xdd;		/* about 0.5 second timeout on each device */
 	n->scntl0 |= 0x8;		/* Enable parity checking */
-
+	
 	/* continued setup */
 	n->sien0 = 0x8f;
 	n->sien1 = 0x04;
@@ -940,7 +940,7 @@ msgsm(Dsa *dsa, Controller *c, int msg, int *cont, int *wakeme)
 			return;
 		}
 		break;
-
+		
 	case NeitherDone:
 	case WideDone:
 	case BothDone:
@@ -1154,12 +1154,14 @@ write_mismatch_recover(Controller *c, Ncr *n, Dsa *dsa)
 static void
 interrupt(Ureg *ur, void *a)
 {
-	int wakeme = 0, cont = -1;
-	uchar istat, dstat;
+	uchar istat;
 	ushort sist;
+	uchar dstat;
+	int wakeme = 0;
+	int cont = -1;
+	Dsa *dsa;
 	Controller *c = a;
 	Ncr *n = c->n;
-	Dsa *dsa;
 
 	USED(ur);
 	if (DEBUG(1))
@@ -1195,11 +1197,8 @@ interrupt(Ureg *ur, void *a)
 
 	sist = (n->sist1<<8)|n->sist0;	/* BUG? can two-byte read be inconsistent? */
 	dstat = n->dstat;
-
 	dsa = (Dsa *)DMASEG_TO_KADDR(legetl(n->dsa));
 	c->running = 0;
-	if (dsa == nil || dsa == (Dsa *)-1)
-		panic("53c8xx: dsa == %ld in interrupt; bad controller", (long)dsa);
 	if (istat & Sip) {
 		if (DEBUG(1))
 			IPRINT("sist = %.4x\n", sist);
@@ -1286,7 +1285,7 @@ interrupt(Ureg *ur, void *a)
 				 * 2. It's not SCSI-II compliant. The new phase will be other
 				 *    than message_in. We should also indicate that the device
 				 *    is asynchronous, if it's the SDTR that got ignored
-				 *
+				 * 
 				 * For now, if the phase switch is not to message_in, and
 				 * and it happens after IDENTIFY and before SDTR, we
 				 * notify the negotiation state machine.
@@ -1501,18 +1500,13 @@ interrupt(Ureg *ur, void *a)
 			IPRINT("%.8lux %.8lux %.8lux\n",
 			    *(ulong *)(addr - 12), *(ulong *)(addr - 8), *(ulong *)(addr - 4));
 			USED(addr, dbc);
-			if (dsa)
-				dsa->p9status = STATUS_FAIL;
+			dsa->p9status = STATUS_FAIL;
 			wakeme = 1;
 		}
 		/*else*/ if (dstat & Bf) {
-			if (dsa == nil)
-				print(PRINTPREFIX "Bus Fault with dsa==0\n");
-			else {
-				print(PRINTPREFIX "%d/%d: Bus Fault\n", dsa->target, dsa->lun);
-				dsa->p9status = STATUS_FAIL;
-			}
+			IPRINT(PRINTPREFIX "%d/%d: Bus Fault\n", dsa->target, dsa->lun);
 			dumpncrregs(c, 1);
+			dsa->p9status = STATUS_FAIL;
 			wakeme = 1;
 		}
 	}
@@ -1520,7 +1514,7 @@ interrupt(Ureg *ur, void *a)
 		ncrcontinue(c);
 	else if (cont >= 0)
 		start(c, cont);
-	if (wakeme && dsa){
+	if (wakeme){
 		if(dsa->p9status == 0xffff)
 			dsa->p9status = STATUS_FAIL;
 		wakeup(dsa);
@@ -1542,25 +1536,28 @@ done(void *arg)
 static int
 xfunc(Controller *c, enum na_external x, unsigned long *v)
 {
-	switch (x)
-	{
+	switch (x) {
+	default:
+		print("xfunc: can't find external %d\n", x);
+		return 0;
 	case X_scsi_id_buf:
-		*v = offsetof(Dsa, scsi_id_buf[0]); return 1;
+		*v = offsetof(Dsa, scsi_id_buf[0]);
+		break;
 	case X_msg_out_buf:
-		*v = offsetof(Dsa, msg_out_buf); return 1;
+		*v = offsetof(Dsa, msg_out_buf);
+		break;
 	case X_cmd_buf:
-		*v = offsetof(Dsa, cmd_buf); return 1;
+		*v = offsetof(Dsa, cmd_buf);
+		break;
 	case X_data_buf:
-		*v = offsetof(Dsa, data_buf); return 1;
+		*v = offsetof(Dsa, data_buf);
+		break;
 	case X_status_buf:
-		*v = offsetof(Dsa, status_buf); return 1;
+		*v = offsetof(Dsa, status_buf);
+		break;
 	case X_dsa_head:
-		*v = DMASEG(&c->dsalist.head[0]); return 1;
-	case X_ssid_mask:
-		*v = SSIDMASK(c); return 1;
-	default:
-		print("xfunc: can't find external %d\n", x);
-		return 0;
+		*v = DMASEG(&c->dsalist.head[0]);
+		break;
 	}
 	return 1;
 }
@@ -1678,7 +1675,7 @@ io(Controller *c, uchar target, uchar lun, int rw, uchar *cmd, int cmdlen, uchar
 	d->scsi_id_buf[2] = target;
 	d->scsi_id_buf[3] = c->scntl3[target];
 	synctodsa(d, c);
-
+	
 	bc = 0;
 
 	d->msg_out[bc] = 0x80 | lun;
@@ -1747,7 +1744,7 @@ io(Controller *c, uchar target, uchar lun, int rw, uchar *cmd, int cmdlen, uchar
 			dumpwritedata(data, datalen);
 	}
 
-	setmovedata(&d->status_buf, DMASEG(&d->status), 1);
+	setmovedata(&d->status_buf, DMASEG(&d->status), 1);	
 
 	d->p9status = 0xffff;
 	d->parityerror = 0;
@@ -1834,7 +1831,7 @@ exec(Scsi *p, int rw)
 	    p->cmd.base, p->cmd.lim - p->cmd.base,
 	    p->data.base, p->data.lim - p->data.base, &transferred);
 	p->data.ptr = p->data.base + transferred;
-	return p->status;
+	return p->status;	
 }
 #endif
 
@@ -1885,7 +1882,7 @@ cribbios(Controller *c)
 {
 	c->bios.scntl3 = c->n->scntl3;
 	c->bios.stest2 = c->n->stest2;
-	KPRINT(PRINTPREFIX "bios scntl3(%.2x) stest2(%.2x)\n", c->bios.scntl3, c->bios.stest2);
+	print(PRINTPREFIX "bios scntl3(%.2x) stest2(%.2x)\n", c->bios.scntl3, c->bios.stest2);
 }
 
 static int
@@ -2008,6 +2005,7 @@ scanpci(void)
 		ap = (Adapter*)mb->data;
 		ap->pcidev = p;
 		ap->port = p->mem[0].bar & ~0x01;
+
 		if(adapter == nil)
 			adapter = mb;
 		else
@@ -2102,7 +2100,7 @@ init(Controller* ctlr, ISAConf* isa, int differential)
 		 */
 		/*
 		 * should allocate memory and copy na_script into it for
-		 * multiple controllers here
+		 * multiple controllers here 
 		 * single controller version uses the microcode in place
 		 */
 		ctlr->script = na_script;
@@ -2125,10 +2123,10 @@ init(Controller* ctlr, ISAConf* isa, int differential)
 
 	isa->port = (ulong)KADDR(regpa);
 	isa->irq = pcidev->intl;
-
+	
 	synctabinit(ctlr);
 	cribbios(ctlr);
-	/*
+	/*	
 	intrenable(isa->irq, interrupt, ctlr, pcidev->tbdf);
 	 */
 	setvec(IRQBASE + isa->irq, interrupt, ctlr);

+ 87 - 79
sys/src/fs/port/9p2.c

@@ -1,7 +1,7 @@
 #include "all.h"
 
 /*
- * stuff from /sys/include/libc.h for 9P2000
+ * stuff from /sys/ninclude/libc.h for 9P2000
  */
 #define	STATMAX	65535U	/* max length of machine-independent stat structure */
 #define	DIRMAX	(sizeof(Dir)+STATMAX)	/* max length of Dir structure */
@@ -60,7 +60,7 @@ void
 mkqid9p1(Qid9p1* qid9p1, Qid* qid)
 {
 	if(qid->path & 0xFFFFFFFF00000000LL)
-		panic("mkqid9p1: path %lluX\n", (Wideoff)qid->path);
+		panic("mkqid9p1: path %lluX\n", qid->path);
 	qid9p1->path = qid->path & 0xFFFFFFFF;
 	if(qid->type & QTDIR)
 		qid9p1->path |= QPDIR;
@@ -183,6 +183,8 @@ version(Chan* chan, Fcall* f, Fcall* r)
 	else
 		r->version = "unknown";
 
+	fileinit(chan);
+
 	return 0;
 }
 
@@ -202,7 +204,7 @@ auth(Chan* chan, Fcall* f, Fcall* r)
 
 	if(cons.flags & authdisableflag)
 		return Eauthdisabled;
-
+	
 	error = 0;
 	aname = f->aname;
 
@@ -236,7 +238,7 @@ auth(Chan* chan, Fcall* f, Fcall* r)
 		goto out;
 	}
 	r->aqid = file->qid;
-
+	
 out:
 	if((cons.flags & attachflag) && error)
 		print("9p2: auth %s %T SUCK EGGS --- %s\n",
@@ -246,6 +248,7 @@ out:
 		if(error)
 			freefp(file);
 	}
+
 	return error;
 }
 
@@ -257,7 +260,7 @@ authorize(Chan* chan, Fcall* f)
 	int db;
 
 	db = cons.flags & authdebugflag;
-
+ 
 	if(strcmp(f->uname, "none") == 0){
 		uid = strtouid(f->uname);
 		if(db)
@@ -309,7 +312,7 @@ attach(Chan* chan, Fcall* f, Fcall* r)
 	Dentry *d;
 	File *file;
 	Filsys *fs;
-	Off raddr;
+	long raddr;
 	int error, u;
 
 	aname = f->aname;
@@ -353,8 +356,11 @@ attach(Chan* chan, Fcall* f, Fcall* r)
 		error = Ealloc;
 		goto out;
 	}
-	if (iaccess(file, d, DEXEC) ||
-	    file->uid == 0 && fs->dev->type == Devro) {
+	if(iaccess(file, d, DEXEC)){
+		error = Eaccess;
+		goto out;
+	}
+	if(file->uid == 0 && fs->dev->type == Devro) {
 		/*
 		 * 'none' not allowed on dump
 		 */
@@ -389,6 +395,7 @@ out:
 		if(error)
 			freefp(file);
 	}
+
 	return error;
 }
 
@@ -430,7 +437,7 @@ walkname(File* file, char* wname, Qid* wqid)
 	Iobuf *p, *p1;
 	Dentry *d, *d1;
 	int error, slot;
-	Off addr, qpath;
+	long addr, qpath;
 
 	p = p1 = nil;
 
@@ -522,8 +529,9 @@ setdot:
 		}
 		for(slot = 0; slot < DIRPERBUF; slot++){
 			d1 = getdir(p1, slot);
-			if (!(d1->mode & DALLOC) ||
-			    strncmp(wname, d1->name, NAMELEN) != 0)
+			if(!(d1->mode & DALLOC))
+				continue;
+			if(strncmp(wname, d1->name, NAMELEN) != 0)
 				continue;
 			/*
 			 * update walk path
@@ -833,7 +841,7 @@ create(Chan* chan, Fcall* f, Fcall* r)
 	Dentry *d, *d1;
 	File *file;
 	int error, slot, slot1, fmod, wok;
-	Off addr, addr1, path;
+	long addr, addr1, path;
 	Tlock *t;
 	Wpath *w;
 
@@ -1036,8 +1044,7 @@ read(Chan* chan, Fcall* f, Fcall* r, uchar* data)
 	File *file;
 	Dentry *d, *d1;
 	Tlock *t;
-	Off addr, offset, start;
-	Timet tim;
+	long addr, offset, start, tim;
 	int error, iounit, nread, count, n, o, slot;
 	Msgbuf *dmb;
 	Dir dir;
@@ -1152,58 +1159,59 @@ dread:
 	}
 
 	dmb = mballoc(iounit, chan, Mbreply1);
-	for (;;) {
-		if(p == nil){
-			/*
-			 * This is just a check to ensure the entry hasn't
-			 * gone away during the read of each directory block.
-			 */
-			p = getbuf(file->fs->dev, file->addr, Bread);
-			if(p == nil || checktag(p, Tdir, QPNONE)){
-				error = Ealloc;
-				goto out1;
-			}
-			d = getdir(p, file->slot);
-			if(d == nil || !(d->mode & DALLOC)){
-				error = Ealloc;
-				goto out1;
-			}
+
+dread1:
+	if(p == nil){
+		/*
+		 * This is just a check to ensure the entry hasn't
+		 * gone away during the read of each directory block.
+		 */
+		p = getbuf(file->fs->dev, file->addr, Bread);
+		if(p == nil || checktag(p, Tdir, QPNONE)){
+			error = Ealloc;
+			goto out1;
 		}
-		p1 = dnodebuf1(p, d, addr, 0, file->uid);
-		p = nil;
-		if(p1 == nil)
+		d = getdir(p, file->slot);
+		if(d == nil || !(d->mode & DALLOC)){
+			error = Ealloc;
 			goto out1;
-		if(checktag(p1, Tdir, QPNONE)){
-			error = Ephase;
+		}
+	}
+	p1 = dnodebuf1(p, d, addr, 0, file->uid);
+	p = nil;
+	if(p1 == nil)
+		goto out1;
+	if(checktag(p1, Tdir, QPNONE)){
+		error = Ephase;
+		putbuf(p1);
+		goto out1;
+	}
+
+	for(; slot < DIRPERBUF; slot++){
+		d1 = getdir(p1, slot);
+		if(!(d1->mode & DALLOC))
+			continue;
+		mkdir9p2(&dir, d1, dmb->data);
+		if((n = convD2M(&dir, data+nread, iounit - nread)) <= BIT16SZ){
 			putbuf(p1);
 			goto out1;
 		}
-
-		for(; slot < DIRPERBUF; slot++){
-			d1 = getdir(p1, slot);
-			if(!(d1->mode & DALLOC))
-				continue;
-			mkdir9p2(&dir, d1, dmb->data);
-			n = convD2M(&dir, data+nread, iounit - nread);
-			if(n <= BIT16SZ){
-				putbuf(p1);
-				goto out1;
-			}
-			start += n;
-			if(start < offset)
-				continue;
-			if(count < n){
-				putbuf(p1);
-				goto out1;
-			}
-			count -= n;
-			nread += n;
-			offset += n;
+		start += n;
+		if(start < offset)
+			continue;
+		if(count < n){
+			putbuf(p1);
+			goto out1;
 		}
-		putbuf(p1);
-		slot = 0;
-		addr++;
+		count -= n;
+		nread += n;
+		offset += n;
 	}
+	putbuf(p1);
+	slot = 0;
+	addr++;
+	goto dread1;
+
 out1:
 	mbfree(dmb);
 	if(error == 0){
@@ -1236,8 +1244,7 @@ write(Chan* chan, Fcall* f, Fcall* r)
 	Dentry *d;
 	File *file;
 	Tlock *t;
-	Off offset, addr, qpath;
-	Timet tim;
+	long offset, addr, tim, qpath;
 	int count, error, nwrite, o, n;
 
 	error = 0;
@@ -1275,8 +1282,11 @@ write(Chan* chan, Fcall* f, Fcall* r)
 		goto out;
 	}
 
-	if ((p = getbuf(file->fs->dev, file->addr, Bread|Bmod)) == nil ||
-	    (d = getdir(p, file->slot)) == nil || !(d->mode & DALLOC)) {
+	if((p = getbuf(file->fs->dev, file->addr, Bread|Bmod)) == nil){
+		error = Ealloc;
+		goto out;
+	}
+	if((d = getdir(p, file->slot)) == nil || !(d->mode & DALLOC)){
 		error = Ealloc;
 		goto out;
 	}
@@ -1404,7 +1414,6 @@ stat(Chan* chan, Fcall* f, Fcall* r, uchar* data)
 	if((file = filep(chan, f->fid, 0)) == nil)
 		return Efid;
 	if(file->qid.type & QTAUTH){
-		memset(&dentry, 0, sizeof dentry);
 		d = &dentry;
 		mkqid9p1(&d->qid, &file->qid);
 		strcpy(d->name, "#¿");
@@ -1427,7 +1436,7 @@ stat(Chan* chan, Fcall* f, Fcall* r, uchar* data)
 		}
 		if(error = mkqidcmp(&file->qid, d))
 			goto out;
-
+	
 		if(d->qid.path == QPROOT)	/* stat of root gives time */
 			d->atime = time();
 	}
@@ -1453,7 +1462,7 @@ wstat(Chan* chan, Fcall* f, Fcall*, char* strs)
 	Iobuf *p, *p1;
 	Dentry *d, *d1;
 	File *file;
-	int error, err, gid, gl, muid, op, slot, tsync, uid;
+	int error, gid, gl, muid, op, slot, tsync, uid;
 	long addr;
 	Dir dir;
 
@@ -1582,16 +1591,19 @@ wstat(Chan* chan, Fcall* f, Fcall*, char* strs)
 	else
 		dir.mtime = d->mtime;
 
-	if(dir.length == ~(Off)0)
-		dir.length = d->size;
-	else {
-		if (dir.length < 0) {
+	if(dir.length != ~0){
+		if(dir.length != d->size){
+			/*
+			 * Currently, can't change length.
+			op = 1;
+			 */
 			error = Ewstatl;
 			goto out;
-		} else if(dir.length != d->size)
-			op = 1;
+		}
 		tsync = 0;
 	}
+	else
+		dir.length = d->size;
 
 	/*
 	 * Check for permission to change .mode, .mtime or .length,
@@ -1670,8 +1682,9 @@ wstat(Chan* chan, Fcall* f, Fcall*, char* strs)
 			}
 			for(slot = 0; slot < DIRPERBUF; slot++){
 				d = getdir(p, slot);
-				if(!(d->mode & DALLOC) ||
-				   strncmp(dir.name, d->name, sizeof d->name))
+				if(!(d->mode & DALLOC))
+					continue;
+				if(strncmp(dir.name, d->name, sizeof(d->name)))
 					continue;
 				error = Eexist;
 				goto out;
@@ -1740,11 +1753,6 @@ wstat(Chan* chan, Fcall* f, Fcall*, char* strs)
 		d->mode = mkmode9p1(dir.mode);
 		file->qid.type = mktype9p2(d->mode);
 		d->mtime = dir.mtime;
-		if (dir.length < d->size) {
-			err = dtrunclen(p, d, dir.length, uid);
-			if (error == 0)
-				error = err;
-		}
 		d->size = dir.length;
 		if(dir.name != d->name)
 			strncpy(d->name, dir.name, sizeof(d->name));

+ 3 - 3
sys/src/fs/port/auth.c

@@ -166,13 +166,13 @@ conslock(void)
 		passtokey(nkey1, passwd);
 		if(memcmp(nkey1, nvr.authkey, DESKEYLEN) == 0) {
 			prdate();
-			return 1;
+			break;
 		}
 
 		print("Bad password\n");
 		delay(1000);
 	}
-	return 0;
+	return 1;
 }
 
 /*
@@ -210,7 +210,7 @@ struct	Auth
 	int	inuse;
 	char	uname[NAMELEN];	/* requestor's remote user name */
 	char	aname[NAMELEN];	/* requested aname */
-	Userid	uid;		/* uid decided on */
+	short	uid;		/* uid decided on */
 	int	phase;
 	char	cchal[CHALLEN];
 	char	tbuf[TICKETLEN+AUTHENTLEN];	/* server ticket */

+ 31 - 29
sys/src/fs/port/con.c

@@ -1,7 +1,7 @@
 #include	"all.h"
 #include	"mem.h"
 
-static	char	conline[2*Maxword];
+static	char	conline[100];
 static	Command	command[100];
 static	Flag	flag[35];
 static	void	installcmds(void);
@@ -67,7 +67,6 @@ loop:
 			goto loop;
 		}
 	}
-	goto loop;
 }
 
 static
@@ -105,7 +104,7 @@ cmd_install(char *arg0, char *help, void (*func)(int, char*[]))
 void
 cmd_exec(char *arg)
 {
-	char line[2*Maxword], *s;
+	char line[100], *s;
 	char *argv[10];
 	int argc, i, c;
 
@@ -421,7 +420,8 @@ static
 void
 cmd_date(int argc, char *argv[])
 {
-	Timet ct, t;
+	ulong ct;
+	long t;
 	char *arg;
 
 	if(argc <= 1)
@@ -556,24 +556,23 @@ cmd_disallow(int, char**)
 }
 
 void
-ckblock(Device *d, Off a, int typ, Off qpath)
+ckblock(Device *d, long a, int typ, long qpath)
 {
 	Iobuf *p;
 
 	if(a) {
 		p = getbuf(d, a, Bread);
-		if(p) {
-			checktag(p, typ, qpath);
+		checktag(p, typ, qpath);
+		if(p)
 			putbuf(p);
-		}
 	}
 }
 
 void
-doclean(Iobuf *p, Dentry *d, int n, Off a)
+doclean(Iobuf *p, Dentry *d, int n, long a)
 {
 	int i, mod, typ;
-	Off qpath;
+	long qpath;
 
 	mod = 0;
 	qpath = d->qid.path;
@@ -581,24 +580,29 @@ doclean(Iobuf *p, Dentry *d, int n, Off a)
 	if(d->mode & DDIR)
 		typ = Tdir;
 	for(i=0; i<NDBLOCK; i++) {
-		print("dblock[%d] = %lld\n", i, (Wideoff)d->dblock[i]);
+		print("dblock[%d] = %ld\n", i, d->dblock[i]);
 		ckblock(p->dev, d->dblock[i], typ, qpath);
 		if(i == n) {
 			d->dblock[i] = a;
 			mod = 1;
-			print("dblock[%d] modified %lld\n", i, (Wideoff)a);
+			print("dblock[%d] modified %ld\n", i, a);
 		}
 	}
 
-	/* add NDBLOCK so user can cite block address by index */
-	for (i = 0; i < NIBLOCK; i++) {
-		print("iblocks[%d] = %lld\n", NDBLOCK+i, (Wideoff)d->iblocks[i]);
-		ckblock(p->dev, d->iblocks[i], Tind1+i, qpath);
-		if(NDBLOCK+i == n) {
-			d->iblocks[i] = a;
-			mod = 1;
-			print("iblocks[%d] modified %lld\n", NDBLOCK+i, (Wideoff)a);
-		}
+	print("iblock[%d] = %ld\n", NDBLOCK, d->iblock);
+	ckblock(p->dev, d->iblock, Tind1, qpath);
+	if(NDBLOCK == n) {
+		d->iblock = a;
+		mod = 1;
+		print("iblock[%d] modified %ld\n", NDBLOCK, a);
+	}
+
+	print("diblock[%d] = %ld\n", NDBLOCK+1, d->diblock);
+	ckblock(p->dev, d->diblock, Tind2, qpath);
+	if(NDBLOCK+1 == n) {
+		d->diblock = a;
+		mod = 1;
+		print("diblock[%d] modified %ld\n", NDBLOCK+1, a);
 	}
 
 	if(mod)
@@ -610,7 +614,7 @@ void
 cmd_clean(int argc, char *argv[])
 {
 	int n;
-	Off a;
+	long a;
 	Iobuf *p;
 	Dentry *d;
 	File *f;
@@ -670,8 +674,8 @@ void
 cmd_version(int, char *[])
 {
 
-	print("%d-bit %s as of %T\n", sizeof(Off)*8 - 1, service, mktime);
-	print("\tlast boot %T\n", boottime);
+	print("%s as of %T\n", service, mktime);
+	print("	last boot %T\n", boottime);
 }
 
 static
@@ -756,7 +760,7 @@ static
 void
 cmd_time(int argc, char *argv[])
 {
-	Timet t1, t2;
+	long t1, t2;
 	int i;
 
 	t1 = MACHP(0)->ticks;
@@ -880,15 +884,13 @@ walkto(char *name)
 			return 1;
 		name = p;
 	}
-	return 0;
 }
 
-/* needs to parse and return vlongs to cope with new larger block numbers */
-vlong
+long
 number(char *arg, int def, int base)
 {
 	int c, sign, any;
-	vlong n;
+	long n;
 
 	if(arg == 0)
 		return def;

+ 0 - 1
sys/src/fs/port/fcmd.c

@@ -73,7 +73,6 @@ fname(char *name)
 		if(i < NAMELEN-1)
 			name[i] = c;
 	}
-	return 0;
 }
 
 int

File diff suppressed because it is too large
+ 306 - 376
sys/src/fs/port/sub.c


Some files were not shown because too many files changed in this diff