Browse Source

fixfmt: more fixes. Also, always include ratrace in ramfs

It makes debugging when booting from rc far, far easier.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 3 years ago
parent
commit
206b0fed8b
59 changed files with 139 additions and 140 deletions
  1. 1 1
      sys/lib/acid/network
  2. 1 1
      sys/src/9/386/devether.c
  3. 1 0
      sys/src/9/amd64/build.json
  4. 1 1
      sys/src/9/amd64/devusb.c
  5. 1 1
      sys/src/9/amd64/devvga.c
  6. 2 2
      sys/src/9/amd64/usbohci.c
  7. 3 3
      sys/src/9/ip/tcp.c
  8. 1 1
      sys/src/9/port/rmap.c
  9. 1 1
      sys/src/cmd/9660srv/main.c
  10. 1 1
      sys/src/cmd/auth/authsrv.c
  11. 1 1
      sys/src/cmd/auth/keyfs.c
  12. 4 4
      sys/src/cmd/aux/acidleak.c
  13. 2 2
      sys/src/cmd/aux/apm.c
  14. 3 3
      sys/src/cmd/aux/astarld.c
  15. 3 3
      sys/src/cmd/aux/flashfs/devfs.c
  16. 1 1
      sys/src/cmd/aux/flashfs/utils.c
  17. 2 2
      sys/src/cmd/aux/olefs.c
  18. 4 4
      sys/src/cmd/aux/pcmcia.c
  19. 1 1
      sys/src/cmd/aux/realemu/main.c
  20. 3 3
      sys/src/cmd/aux/vga/io.c
  21. 2 2
      sys/src/cmd/aux/vga/main.c
  22. 13 13
      sys/src/cmd/aux/vga/nvidia.c
  23. 1 1
      sys/src/cmd/aux/vga/vmware.c
  24. 1 1
      sys/src/cmd/cdfs/scsi.c
  25. 1 1
      sys/src/cmd/cfs/disk.c
  26. 1 1
      sys/src/cmd/cwfs/9p1.c
  27. 1 1
      sys/src/cmd/cwfs/console.c
  28. 1 1
      sys/src/cmd/cwfs/sub.c
  29. 2 2
      sys/src/cmd/disk/format.c
  30. 2 2
      sys/src/cmd/disk/kfs/chk.c
  31. 1 1
      sys/src/cmd/disk/kfs/iobuf.c
  32. 7 7
      sys/src/cmd/disk/kfs/ofcallfmt.c
  33. 1 1
      sys/src/cmd/disk/kfs/sub.c
  34. 4 4
      sys/src/cmd/dossrv/dossubs.c
  35. 3 3
      sys/src/cmd/execnet/fs.c
  36. 1 1
      sys/src/cmd/fossil/source.c
  37. 6 6
      sys/src/cmd/gzip/unzip.c
  38. 1 1
      sys/src/cmd/ip/dhcpclient.c
  39. 1 1
      sys/src/cmd/ip/httpd/hints.c
  40. 1 1
      sys/src/cmd/ip/httpd/sendfd.c
  41. 1 1
      sys/src/cmd/ip/httpfile.c
  42. 1 1
      sys/src/cmd/ip/snoopy/bootp.c
  43. 1 1
      sys/src/cmd/jpg/onechan.c
  44. 1 1
      sys/src/cmd/mk/graph.c
  45. 1 1
      sys/src/cmd/paqfs/paqfs.c
  46. 3 3
      sys/src/cmd/scuzz/scuzz.c
  47. 3 3
      sys/src/cmd/ssh1/sshnet.c
  48. 1 1
      sys/src/cmd/tweak.c
  49. 1 1
      sys/src/cmd/venti/srv/arena.c
  50. 2 2
      sys/src/cmd/venti/srv/conv.c
  51. 2 2
      sys/src/cmd/venti/srv/dcache.c
  52. 3 3
      sys/src/cmd/vnc/auth.c
  53. 3 3
      sys/src/cmd/webfs/fs.c
  54. 1 1
      sys/src/libdisk/scsi.c
  55. 7 7
      sys/src/libmach/8db.c
  56. 2 2
      sys/src/libmach/machdata.c
  57. 10 12
      sys/src/libmemdraw/draw.c
  58. 6 6
      sys/src/libmemdraw/drawtest.c
  59. 2 2
      sys/src/libventi/file.c

+ 1 - 1
sys/lib/acid/network

@@ -93,7 +93,7 @@ qtostr(q)
 {
 	complex Queue q;
 
-	return "queue("+itoa(q, "%lux")+") ["+itoa(q.len, "%d")+","+itoa(q.dlen, "%d")+","+itoa(qblocks(q), "%d")+"]";
+	return "queue("+itoa(q, "%lx")+") ["+itoa(q.len, "%d")+","+itoa(q.dlen, "%d")+","+itoa(qblocks(q), "%d")+"]";
 }
 
 defn

+ 1 - 1
sys/src/9/386/devether.c

@@ -418,7 +418,7 @@ etherprobe(int cardno, int ctlrno)
 	if(ether->ISAConf.mem)
 		i += sprint(buf+i, " addr %#p", ether->ISAConf.mem);
 	if(ether->ISAConf.size)
-		i += sprint(buf+i, " size 0x%luX", ether->ISAConf.size);
+		i += sprint(buf+i, " size 0x%lX", ether->ISAConf.size);
 	i += sprint(buf+i, ": %2.2ux%2.2ux%2.2ux%2.2ux%2.2ux%2.2ux",
 		ether->ea[0], ether->ea[1], ether->ea[2],
 		ether->ea[3], ether->ea[4], ether->ea[5]);

+ 1 - 0
sys/src/9/amd64/build.json

@@ -100,6 +100,7 @@
 				"ps": "/$ARCH/bin/ps",
 				"ed": "/$ARCH/bin/ed",
 				"rcmain": "/rc/lib/rcmain",
+				"ratrace": "/$ARCH/bin/ratrace",
 				"screenconsole": "/$ARCH/bin/aux/screenconsole",
 				"realemu": "/$ARCH/bin/aux/realemu",
 				"vga": "/$ARCH/bin/aux/vga",

+ 1 - 1
sys/src/9/amd64/devusb.c

@@ -722,7 +722,7 @@ hciprobe(int cardno, int ctlrno)
 	 * modern machines have too many usb controllers to list on
 	 * the console.
 	 */
-	dprint("#u/usb/ep%d.0: %s: port 0x%luX irq %d\n",
+	dprint("#u/usb/ep%d.0: %s: port 0x%lX irq %d\n",
 		epnb, hcitypes[cardno].type, hp->ISAConf.port, hp->ISAConf.irq);
 	epnb++;
 	return hp;

+ 1 - 1
sys/src/9/amd64/devvga.c

@@ -240,7 +240,7 @@ vgaread(Chan* c, void* a, int32_t n, int64_t off)
 		len += snprint(p+len, READSTR-len, "hwaccel %s\n", hwaccel ? "on" : "off");
 		len += snprint(p+len, READSTR-len, "hwblank %s\n", hwblank ? "on" : "off");
 		len += snprint(p+len, READSTR-len, "panning %s\n", panning ? "on" : "off");
-		len += snprint(p+len, READSTR-len, "addr p 0x%lux v 0x%p size 0x%x\n", scr->paddr, scr->vaddr, scr->apsize);
+		len += snprint(p+len, READSTR-len, "addr p 0x%lx v 0x%p size 0x%x\n", scr->paddr, scr->vaddr, scr->apsize);
 		USED(len);
 
 		n = readstr(offset, a, n, p);

+ 2 - 2
sys/src/9/amd64/usbohci.c

@@ -1245,7 +1245,7 @@ isointerrupt(Ctlr *ctlr, Ep *ep, Qio *io, Td *td, int n)
 		bp->wp = bp->rp;
 		io->err = errmsg(err);
 		if(debug || ep->debug){
-			print("ohci: isointerrupt: ep%d.%d: err %d (%s) frnum 0x%lux\n",
+			print("ohci: isointerrupt: ep%d.%d: err %d (%s) frnum 0x%lx\n",
 				ep->dev->nb, ep->nb,
 				err, errmsg(err), ctlr->ohci->fmnumber);
 			dumptd(td, "failed", ed->ctrl & Ediso);
@@ -2390,7 +2390,7 @@ scanpci(void)
 		    p->ccrp != 0x10)
 			continue;
 		mem = p->mem[0].bar & ~0x0F;
-		dprint("ohci: %x/%x port 0x%lux size 0x%x irq %d\n",
+		dprint("ohci: %x/%x port 0x%lx size 0x%x irq %d\n",
 			p->vid, p->did, mem, p->mem[0].size, p->intl);
 		if(mem == 0){
 			print("ohci: failed to map registers\n");

+ 3 - 3
sys/src/9/ip/tcp.c

@@ -1745,7 +1745,7 @@ tcpincoming(Conv *s, Tcp *segp, uint8_t *src, uint8_t *dst, uint8_t version)
 
 		/* we're assuming no data with the initial SYN */
 		if(segp->seq != lp->irs+1 || segp->ack != lp->iss+1){
-			netlog(s->p->f, Logtcp, "tcpincoming s %lux/%lux a %lux %lux\n",
+			netlog(s->p->f, Logtcp, "tcpincoming s %lx/%lx a %lx %lx\n",
 				segp->seq, lp->irs+1, segp->ack, lp->iss+1);
 			lp = nil;
 		} else {
@@ -2304,7 +2304,7 @@ reset:
 	if(tcb->state != Syn_received && (seg.flags & RST) == 0){
 		if(tcpporthogdefense
 		&& seq_within(seg.ack, tcb->snd.una-(1<<31), tcb->snd.una-(1<<29))){
-			print("stateless hog %I.%d->%I.%d f %x %lux - %lux - %lux\n",
+			print("stateless hog %I.%d->%I.%d f %x %lx - %lx - %lx\n",
 				source, seg.source, dest, seg.dest, seg.flags,
 				tcb->snd.una-(1<<31), seg.ack, tcb->snd.una-(1<<29));
 			localclose(s, "stateless hog");
@@ -2370,7 +2370,7 @@ reset:
 				if(tcb->rcv.nxt != seg.seq)
 					netlog(f, Logtcp, "out of order RST "
 						"rcvd: %I.%d -> %I.%d, rcv.nxt "
-						"%lux seq %lux\n",
+						"%lx seq %lx\n",
 						s->raddr, s->rport, s->laddr,
 						s->lport, tcb->rcv.nxt, seg.seq);
 			}

+ 1 - 1
sys/src/9/port/rmap.c

@@ -58,7 +58,7 @@ rmapfree(RMap* rmap, uintptr_t addr, uint size)
 		}else{
 			do{
 				if(mp >= rmap->mapend){
-					print("mapfree: %s: losing 0x%luX, %u\n", rmap->name, addr, size);
+					print("mapfree: %s: losing 0x%lX, %u\n", rmap->name, addr, size);
 					break;
 				}
 				t = mp->addr;

+ 1 - 1
sys/src/cmd/9660srv/main.c

@@ -219,7 +219,7 @@ io(int srvfd)
 		if(write(srvfd, mdata, n) != n)
 			panic(1, "mount write");
 		if(nerr_lab != 0)
-			panic(0, "err stack %d: %lux %lux %lux %lux %lux %lux", nerr_lab,
+			panic(0, "err stack %d: %lx %lx %lx %lx %lx %lx", nerr_lab,
 			err_lab[0][JMPBUFPC], err_lab[1][JMPBUFPC],
 			err_lab[2][JMPBUFPC], err_lab[3][JMPBUFPC],
 			err_lab[4][JMPBUFPC], err_lab[5][JMPBUFPC]);

+ 1 - 1
sys/src/cmd/auth/authsrv.c

@@ -404,7 +404,7 @@ apop(Ticketreq *tr, int type)
 	 */
 	randombytes((uint8_t*)rb, sizeof(rb));
 	p = chal;
-	p += snprint(p, sizeof(chal), "<%lux%lux.%lux%lux@%s>",
+	p += snprint(p, sizeof(chal), "<%lx%lx.%lx%lx@%s>",
 		rb[0], rb[1], rb[2], rb[3], domainname());
 	challen = p - chal;
 	print("%c%-5d%s", AuthOKvar, challen, chal);

+ 1 - 1
sys/src/cmd/auth/keyfs.c

@@ -1065,7 +1065,7 @@ io(int in, int out)
 
 		now = time(0);
 		if(warnarg && (now - lastwarning > 24*60*60)){
-			syslog(0, "auth", "keyfs starting warnings: %lux %lux",
+			syslog(0, "auth", "keyfs starting warnings: %lx %lx",
 				now, lastwarning);
 			warning();
 			lastwarning = now;

+ 4 - 4
sys/src/cmd/aux/acidleak.c

@@ -286,15 +286,15 @@ main(int argc, char **argv)
 		y = (len+x-1)/x;
 		Bprint(&bio, "%11s %11d %11d %11d %11d ", "m8", 0, 0, x, y);
 
-//fprint(2, "alloc %lux %lux x %d y %d res %d\n", allocstart, allocend, x, y, resolution);
+//fprint(2, "alloc %lx %lx x %d y %d res %d\n", allocstart, allocend, x, y, resolution);
 
 		b = block;
 		eb = block+nblock;
 		for(u = allocstart; u<allocend; u+=resolution){
-//fprint(2, "u %lux %lux baddr %lux\n", u, u+resolution, b->addr);
+//fprint(2, "u %lx %lx baddr %lx\n", u, u+resolution, b->addr);
 			while(b->addr+b->size <= u && b < eb)
 //{
-//fprint(2, "\tskip %lux %lux\n", b->addr, b->addr+b->size);
+//fprint(2, "\tskip %lx %lx\n", b->addr, b->addr+b->size);
 				b++;
 //}
 			nhdr = 0;
@@ -305,7 +305,7 @@ main(int argc, char **argv)
 				b--;
 
 			for(; b->addr < u+resolution && b < eb; b++){
-//fprint(2, "\tblock %lux %lux %d\n", b->addr, b->addr+b->size, b->mark);
+//fprint(2, "\tblock %lx %lx %d\n", b->addr, b->addr+b->size, b->mark);
 				if(rXr(b->addr, b->addr+hdr, u, u+resolution)
 				|| rXr(b->addr+b->size-8, b->addr+b->size, u, u+resolution)){
 					if(b->mark == 0 && !b->free)

+ 2 - 2
sys/src/cmd/aux/apm.c

@@ -161,7 +161,7 @@ int apmdebug;
 static int
 _apmcall(int fd, Ureg *u)
 {
-if(apmdebug) fprint(2, "call ax 0x%lux bx 0x%lux cx 0x%lux\n",
+if(apmdebug) fprint(2, "call ax 0x%lx bx 0x%lx cx 0x%lx\n",
 	u->ax&0xFFFF, u->bx&0xFFFF, u->cx&0xFFFF);
 
 	seek(fd, 0, 0);
@@ -172,7 +172,7 @@ if(apmdebug) fprint(2, "call ax 0x%lux bx 0x%lux cx 0x%lux\n",
 	if(read(fd, u, sizeof *u) != sizeof *u)
 		return -1;
 
-if(apmdebug) fprint(2, "flags 0x%lux ax 0x%lux bx 0x%lux cx 0x%lux\n",
+if(apmdebug) fprint(2, "flags 0x%lx ax 0x%lx bx 0x%lx cx 0x%lx\n",
 	u->flags&0xFFFF, u->ax&0xFFFF, u->bx&0xFFFF, u->cx&0xFFFF);
 
 	if(u->flags & 1) {	/* carry flag */

+ 3 - 3
sys/src/cmd/aux/astarld.c

@@ -85,7 +85,7 @@ loadhex(char* file, int mfd)
 		case 0: /* data */
 			addr = seg + c.addr;
 			if(addr + c.dlen > Memsize)
-				sysfatal("addr out of range: %lux-%lux", addr, addr+c.dlen);
+				sysfatal("addr out of range: %lx-%lx", addr, addr+c.dlen);
 			if(seek(mfd, addr, 0) < 0)
 				sysfatal("seeking to %lu: %r", addr);
 			if(write(mfd, c.bytes+Doff, c.dlen) != c.dlen)
@@ -95,7 +95,7 @@ loadhex(char* file, int mfd)
 			if(read(mfd, buf, c.dlen) != c.dlen)
 				sysfatal("reading: %r");
 			if(memcmp(buf, c.bytes+Doff, c.dlen) != 0)
-				print("readback error at %lux\n", addr);
+				print("readback error at %lx\n", addr);
 			if(dump)
 				print("%8.8lux: %d\n", addr, c.dlen);
 			break;
@@ -105,7 +105,7 @@ loadhex(char* file, int mfd)
 		case 2: /* segment */
 			seg = ((c.bytes[Doff]<<8) | c.bytes[Doff+1]) <<4;
 			if(seg >= Memsize)
-				sysfatal("seg out of range: %lux", seg);
+				sysfatal("seg out of range: %lx", seg);
 			if(dump)
 				print("seg %8.8lux\n", seg);
 			break;

+ 3 - 3
sys/src/cmd/aux/flashfs/devfs.c

@@ -98,9 +98,9 @@ readdata(int sect, void *buff, uint32_t count, uint32_t off)
 	m = sect * sectsize + off;
 	n = pread(flash.dfd, buff, count, m);
 	if(n < 0)
-		sysfatal("error reading at %lux: %r", m);
+		sysfatal("error reading at %lx: %r", m);
 	if(n != count)
-		sysfatal("short read at %lux, %ld instead of %lu", m, n, count);
+		sysfatal("short read at %lx, %ld instead of %lu", m, n, count);
 }
 
 int
@@ -114,7 +114,7 @@ writedata(int err, int sect, void *buff, uint32_t count, uint32_t off)
 	if(n < 0){
 		if(err)
 			return 0;
-		sysfatal("error writing at %lux: %r", m);
+		sysfatal("error writing at %lx: %r", m);
 	}
 	if(n != count){
 		if(err)

+ 1 - 1
sys/src/cmd/aux/flashfs/utils.c

@@ -42,7 +42,7 @@ putc3(uint8_t *buff, uint32_t v)
 		return 3;
 	}
 
-	fprint(2, "%s: putc3 fail 0x%lux, called from %#p\n", prog, v, getcallerpc(&buff));
+	fprint(2, "%s: putc3 fail 0x%lx, called from %#p\n", prog, v, getcallerpc());
 	abort();
 	return -1;
 }

+ 2 - 2
sys/src/cmd/aux/olefs.c

@@ -123,7 +123,7 @@ oreadblock(Ofile *f, int block, uint32_t off, char *buf, int nbuf)
 	int n;
 
 	if(block < 0 || block >= f->nblock) {
-		werrstr("attempt to read %x/%lux\n", block, f->nblock);
+		werrstr("attempt to read %x/%lx\n", block, f->nblock);
 		return -1;
 	}
 
@@ -219,7 +219,7 @@ dumpdir(Ofile *f, uint32_t dnum)
 	Odir d;
 
 	if(oreaddir(f, dnum, &d) != 1) {
-		fprint(2, "dumpdir %lux failed\n", dnum);
+		fprint(2, "dumpdir %lx failed\n", dnum);
 		return;
 	}
 

+ 4 - 4
sys/src/cmd/aux/pcmcia.c

@@ -350,7 +350,7 @@ tcfig(int ttype, int len)
 	print("configuration registers at");
 	for(i = 0; i < 16; i++)
 		if((1<<i) & cregs)
-			print(" (%d)0x%lux", i, caddr + i*2);
+			print(" (%d)0x%lx", i, caddr + i*2);
 	print("\n");
 }
 
@@ -488,7 +488,7 @@ range(int asize, int lsize)
 
 	address = getlong(asize);
 	len = getlong(lsize);
-	print("\t\t%lux - %lux\n", address, address+len);
+	print("\t\t%lx - %lx\n", address, address+len);
 }
 
 char *ioaccess[4] =
@@ -560,10 +560,10 @@ memspace(int asize, int lsize, int host)
 	address = getlong(asize)*256;
 	if(host){
 		haddress = getlong(asize)*256;
-		print("\tmemory address range 0x%lux - 0x%lux hostaddr 0x%lux\n",
+		print("\tmemory address range 0x%lx - 0x%lx hostaddr 0x%lx\n",
 			address, address+len, haddress);
 	} else
-		print("\tmemory address range 0x%lux - 0x%lux\n", address, address+len);
+		print("\tmemory address range 0x%lx - 0x%lx\n", address, address+len);
 }
 
 void

+ 1 - 1
sys/src/cmd/aux/realemu/main.c

@@ -368,7 +368,7 @@ cpuinit(void)
 		off = (unsigned long)i << 16;
 		seek(realmemfd, off, 0);
 		if(readn(realmemfd, memory + off, 0x10000) != 0x10000)
-			sysfatal("read real mem %lux: %r\n", off);
+			sysfatal("read real mem %lx: %r\n", off);
 	}
 
 	cpu.ic = 0;

+ 3 - 3
sys/src/cmd/aux/vga/io.c

@@ -239,11 +239,11 @@ readbios(int32_t len, int32_t offset)
 		return bios+(offset - biosoffset);
 
 	if(len > sizeof(bios))
-		error("enormous bios len %ld at %lux\n", len, offset);
+		error("enormous bios len %ld at %lx\n", len, offset);
 
 	n = doreadbios(bios, sizeof(bios), offset);
 	if(n < len)
-		error("short bios read %ld at %lux got %d\n", len,offset, n);
+		error("short bios read %ld at %lx got %d\n", len,offset, n);
 
 	biosoffset = offset;
 	bioslen = n;
@@ -274,7 +274,7 @@ dumpbios(int32_t size)
 	}
 
 	for(i = 0; i < size; i += 16){
-		Bprint(&stdout, "0x%luX", offset+i);
+		Bprint(&stdout, "0x%lX", offset+i);
 		for(n = 0; n < 16; n++)
 			Bprint(&stdout, " %2.2uX", buf[i+n]);
 		Bprint(&stdout, "  ");

+ 2 - 2
sys/src/cmd/aux/vga/main.c

@@ -123,7 +123,7 @@ linear(Vga* vga)
 		 */
 		vgactlr("addr", buf);
 		if(atoi(buf)==0 && (buf[0]!='p' || buf[1]!=' ' || atoi(buf+2)==0)){
-			sprint(buf, "0x%lux 0x%lux", vga->apz ? vga->apz : vga->vmz, vga->vma);
+			sprint(buf, "0x%lx 0x%lx", vga->apz ? vga->apz : vga->vmz, vga->vma);
 			vgactlw("linear", buf);
 			vgactlr("addr", buf);
 		}
@@ -425,7 +425,7 @@ main(int argc, char** argv)
 			if(vga->vesa)
 				vgactlw("type", vtype);
 
-			sprint(buf, "%lux%lux%d %s",
+			sprint(buf, "%lx%lx%d %s",
 				vga->virtx, vga->virty,
 				vga->mode->z, vga->mode->chan);
 			if(rflag){

+ 13 - 13
sys/src/cmd/aux/vga/nvidia.c

@@ -1201,31 +1201,31 @@ dump(Vga* vga, Ctlr* ctlr)
 	printitem(ctlr->name, "timingV");
 	Bprint(&stdout, " %x\n", nv->timingV);
 	printitem(ctlr->name, "vpll");
-	Bprint(&stdout, " %lux\n", nv->vpll);
+	Bprint(&stdout, " %lx\n", nv->vpll);
 	printitem(ctlr->name, "vpllB");
-	Bprint(&stdout, " %lux\n", nv->vpllB);
+	Bprint(&stdout, " %lx\n", nv->vpllB);
 	printitem(ctlr->name, "vpll2");
-	Bprint(&stdout, " %lux\n", nv->vpll2);
+	Bprint(&stdout, " %lx\n", nv->vpll2);
 	printitem(ctlr->name, "vpll2B");
-	Bprint(&stdout, " %lux\n", nv->vpll2B);
+	Bprint(&stdout, " %lx\n", nv->vpll2B);
 	printitem(ctlr->name, "pllsel");
-	Bprint(&stdout, " %lux\n", nv->pllsel);
+	Bprint(&stdout, " %lx\n", nv->pllsel);
 	printitem(ctlr->name, "general");
-	Bprint(&stdout, " %lux\n", nv->general);
+	Bprint(&stdout, " %lx\n", nv->general);
 	printitem(ctlr->name, "scale");
-	Bprint(&stdout, " %lux\n", nv->scale);
+	Bprint(&stdout, " %lx\n", nv->scale);
 	printitem(ctlr->name, "config");
-	Bprint(&stdout, " %lux\n", nv->config);
+	Bprint(&stdout, " %lx\n", nv->config);
 	printitem(ctlr->name, "head");
-	Bprint(&stdout, " %lux\n", nv->head);
+	Bprint(&stdout, " %lx\n", nv->head);
 	printitem(ctlr->name, "head2");
-	Bprint(&stdout, " %lux\n", nv->head2);
+	Bprint(&stdout, " %lx\n", nv->head2);
 	printitem(ctlr->name, "cursorconfig");
-	Bprint(&stdout, " %lux\n", nv->cursorconfig);
+	Bprint(&stdout, " %lx\n", nv->cursorconfig);
 	printitem(ctlr->name, "dither");
-	Bprint(&stdout, " %lux\n", nv->dither);
+	Bprint(&stdout, " %lx\n", nv->dither);
 	printitem(ctlr->name, "crtcsync");
-	Bprint(&stdout, " %lux\n", nv->crtcsync);
+	Bprint(&stdout, " %lx\n", nv->crtcsync);
 	printitem(ctlr->name, "islcd");
 	Bprint(&stdout, " %d\n", nv->islcd);
 	printitem(ctlr->name, "twoheads");

+ 1 - 1
sys/src/cmd/aux/vga/vmware.c

@@ -250,7 +250,7 @@ load(Vga* vga, Ctlr *ctlr)
 	x = vmrd(vm, Rbpl)/(vm->depth/8);
 	if(x != vga->mode->x){
 		vga->virtx = x;
-		sprint(buf, "%lux%lux%d %s", vga->virtx, vga->virty,
+		sprint(buf, "%lx%lx%d %s", vga->virtx, vga->virty,
 			vga->mode->z, vga->mode->chan);
 		vgactlw("size", buf);
 	}

+ 1 - 1
sys/src/cmd/cdfs/scsi.c

@@ -181,7 +181,7 @@ _scsicmd(Scsi *s, uint8_t *cmd, int ccount, void *data, int dcount,
 	if(status == 0)
 		return n;
 
-	werrstr("cmd %2.2uX: status %luX dcount %d n %d", cmd[0], status, dcount, n);
+	werrstr("cmd %2.2uX: status %lX dcount %d n %d", cmd[0], status, dcount, n);
 	return -1;
 }
 

+ 1 - 1
sys/src/cmd/cfs/disk.c

@@ -55,7 +55,7 @@ dinit(Disk *d, int f, int psize, char *expname)
 	}
 	ba = (Dalloc*)buf;
 	if(ba->bsize <= 0){
-		fprint(2, "dinit: bsize 0x%lux<= 0\n", ba->bsize);
+		fprint(2, "dinit: bsize 0x%lx<= 0\n", ba->bsize);
 		return -1;
 	}
 	if((ba->bsize % psize) != 0){

+ 1 - 1
sys/src/cmd/cwfs/9p1.c

@@ -127,7 +127,7 @@ authorize(Chan *cp, Fcall *in, Fcall *ou)
 	bit = 1<<x;
 	if(x < 0 || x > 31 || (bit&aip->idvec)){
 		unlock(&aip->idlock);
-		print("9p1: id out of range: idoff %ld idvec %lux id %ld\n",
+		print("9p1: id out of range: idoff %ld idvec %lx id %ld\n",
 		   aip->idoffset, aip->idvec, a.id);
 		return 0;
 	}

+ 1 - 1
sys/src/cmd/cwfs/console.c

@@ -233,7 +233,7 @@ f_fstat(Chan *cp, Fcall *in, Fcall *ou)
 
 	print("name = %.*s\n", NAMELEN, d->name);
 	print("uid = %d; gid = %d; muid = %d\n", d->uid, d->gid, d->muid);
-	print("size = %lld; qid = %llux/%lux\n", (Wideoff)d->size,
+	print("size = %lld; qid = %llux/%lx\n", (Wideoff)d->size,
 		(Wideoff)d->qid.path, d->qid.version);
 	print("atime = %ld; mtime = %ld\n", d->atime, d->mtime);
 	print("dblock =");

+ 1 - 1
sys/src/cmd/cwfs/sub.c

@@ -843,7 +843,7 @@ mbfree(Msgbuf *mb)
 		return;
 	assert(mb->magic == Mbmagic);
 	if (mb->magic != Mbmagic)
-		panic("mbfree: bad magic 0x%lux", mb->magic);
+		panic("mbfree: bad magic 0x%lx", mb->magic);
 	if(mb->flags & BTRACE)
 		print("mbfree: BTRACE cat=%d flags=%x, caller %#p\n",
 			mb->category, mb->flags, getcallerpc());

+ 2 - 2
sys/src/cmd/disk/format.c

@@ -568,7 +568,7 @@ if(chatty) print("driveno = %x\n", b->driveno);
 		b->bootsig = 0x29;
 		x = disk->offset + b->nfats*fatsecs + nresrv;
 		PUTLONG(b->volid, x);
-if(chatty) print("volid = %lux %lux\n", x, GETLONG(b->volid));
+if(chatty) print("volid = %lx %lx\n", x, GETLONG(b->volid));
 		memmove(b->label, label, sizeof(b->label));
 		sprint(r, "FAT%d    ", fatbits);
 		memmove(b->type, r, sizeof(b->type));
@@ -686,7 +686,7 @@ if(chatty) print("%s @%lluX\n", d->name, seek(disk->wfd, 0LL, 1));
 		/*
 		 * Add the filename to the root.
 		 */
-fprint(2, "add %s at clust %lux\n", d->name, x);
+fprint(2, "add %s at clust %lx\n", d->name, x);
 		addrname(p, d, *argv, x);
 		free(d);
 	}

+ 2 - 2
sys/src/cmd/disk/kfs/chk.c

@@ -649,14 +649,14 @@ qmark(int32_t qpath)
 	if(i < 0 || i >= sizqbits) {
 		nqbad++;
 		if(nqbad < 20)
-			cprint("check: \"%s\": qid out of range %lux\n",
+			cprint("check: \"%s\": qid out of range %lx\n",
 				name, qpath);
 		return;
 	}
 	if((qbits[i] & b) && !ronly) {
 		nqbad++;
 		if(nqbad < 20)
-			cprint("check: \"%s\": qid dup %lux\n",
+			cprint("check: \"%s\": qid dup %lx\n",
 				name, qpath);
 	}
 	qbits[i] |= b;

+ 1 - 1
sys/src/cmd/disk/kfs/iobuf.c

@@ -223,7 +223,7 @@ checktag(Iobuf *p, int tag, int32_t qpath)
 			if(qpath == (t->path&~QPDIR))	/* old bug */
 				return 0;
 			if(1 || CHAT(0))
-				print("	tag/path = %lux; expected %G/%lux\n",
+				print("	tag/path = %lx; expected %G/%lx\n",
 					t->path, tag, qpath);
 			return 1;
 		}

+ 7 - 7
sys/src/cmd/disk/kfs/ofcallfmt.c

@@ -52,7 +52,7 @@ ofcallfmt(Fmt *f1)
 			tag, f->fid, f->uname, f->aname, f->auth);
 		break;
 	case Rattach9p1:
-		sprint(buf, "Rattach9p1 tag %u fid %d qid 0x%lux|0x%lux",
+		sprint(buf, "Rattach9p1 tag %u fid %d qid 0x%lx|0x%lx",
 			tag, fid, f->qid.path, f->qid.version);
 		break;
 	case Tclone9p1:	/* 60 */
@@ -65,22 +65,22 @@ ofcallfmt(Fmt *f1)
 		sprint(buf, "Twalk9p1 tag %u fid %d name %.28s", tag, fid, f->name);
 		break;
 	case Rwalk9p1:
-		sprint(buf, "Rwalk9p1 tag %u fid %d qid 0x%lux|0x%lux",
+		sprint(buf, "Rwalk9p1 tag %u fid %d qid 0x%lx|0x%lx",
 			tag, fid, f->qid.path, f->qid.version);
 		break;
 	case Topen9p1:	/* 64 */
 		sprint(buf, "Topen9p1 tag %u fid %d mode %d", tag, fid, f->mode);
 		break;
 	case Ropen9p1:
-		sprint(buf, "Ropen9p1 tag %u fid %d qid 0x%lux|0x%lux",
+		sprint(buf, "Ropen9p1 tag %u fid %d qid 0x%lx|0x%lx",
 			tag, fid, f->qid.path, f->qid.version);
 		break;
 	case Tcreate9p1:	/* 66 */
-		sprint(buf, "Tcreate9p1 tag %u fid %d name %.28s perm 0x%lux mode %d",
+		sprint(buf, "Tcreate9p1 tag %u fid %d name %.28s perm 0x%lx mode %d",
 			tag, fid, f->name, f->perm, f->mode);
 		break;
 	case Rcreate9p1:
-		sprint(buf, "Rcreate9p1 tag %u fid %d qid 0x%lux|0x%lux",
+		sprint(buf, "Rcreate9p1 tag %u fid %d qid 0x%lx|0x%lx",
 			tag, fid, f->qid.path, f->qid.version);
 		break;
 	case Tread9p1:	/* 68 */
@@ -133,7 +133,7 @@ ofcallfmt(Fmt *f1)
 			tag, fid, f->newfid, f->name);
 		break;
 	case Rclwalk9p1:
-		sprint(buf, "Rclwalk9p1 tag %u fid %d qid 0x%lux|0x%lux",
+		sprint(buf, "Rclwalk9p1 tag %u fid %d qid 0x%lx|0x%lx",
 			tag, fid, f->qid.path, f->qid.version);
 		break;
 	default:
@@ -146,7 +146,7 @@ static void
 fdirconv(char *buf, Dentry *d)
 {
 	sprint(buf, "'%s' uid=%d gid=%d "
-		"q %lux|%lux m %uo "
+		"q %lx|%lx m %uo "
 		"at %ld mt %ld l %ld ",
 			d->name, d->uid, d->gid,
 			d->qid.path, d->qid.version, d->mode,

+ 1 - 1
sys/src/cmd/disk/kfs/sub.c

@@ -492,7 +492,7 @@ addfree(Device dev, int32_t addr, Superb *sb)
 	Iobuf *p;
 
 	if(addr >= sb->fsize){
-		print("addfree: bad addr %lux\n", addr);
+		print("addfree: bad addr %lx\n", addr);
 		return;
 	}
 	n = sb->fbuf.nfree;

+ 4 - 4
sys/src/cmd/dossrv/dossubs.c

@@ -1608,7 +1608,7 @@ makecontig(Xfile *f, int nextra)
 	for(i=0; i<nclust+nextra; i++)
 		assert(getfat(xf, start+i) == 0);
 
-	chat("relocate chain %lux -> 0x%lux len %d\n", fileclust(f, 0, 0), start, nclust);
+	chat("relocate chain %lx -> 0x%lx len %d\n", fileclust(f, 0, 0), start, nclust);
 
 	wclust = start;
 	for(rclust = fileclust(f, 0, 0); rclust > 0; rclust = next){
@@ -1632,7 +1632,7 @@ makecontig(Xfile *f, int nextra)
 	}
 
 	/* now wclust points at the first new cluster; chain it in */
-	chat("wclust 0x%lux start 0x%lux (fat->0x%lux) nclust %d\n", wclust, start, getfat(xf, start), nclust);
+	chat("wclust 0x%lx start 0x%lx (fat->0x%lx) nclust %d\n", wclust, start, getfat(xf, start), nclust);
 	assert(wclust == start+nclust);
 	putfat(xf, wclust, 0xffffffff);	/* end of file */
 
@@ -1850,8 +1850,8 @@ bootsecdump32(int fd, Xfs *xf, Dosboot32 *b32)
 		else{
 			fprint(fd, "\nfat info %d\n", fisec);
 			fi = (Fatinfo*)p1->iobuf;
-			fprint(fd, "sig1: 0x%lux sb 0x%lux\n", GLONG(fi->sig1), FATINFOSIG1);
-			fprint(fd, "sig: 0x%lux sb 0x%lux\n", GLONG(fi->sig), FATINFOSIG);
+			fprint(fd, "sig1: 0x%lx sb 0x%lx\n", GLONG(fi->sig1), FATINFOSIG1);
+			fprint(fd, "sig: 0x%lx sb 0x%lx\n", GLONG(fi->sig), FATINFOSIG);
 			fprint(fd, "freeclust: %lu\n", GLONG(fi->freeclust));
 			fprint(fd, "nextfree: %lu\n", GLONG(fi->nextfree));
 			fprint(fd, "reserved: %lu %lu %lu\n", GLONG(fi->resrv), GLONG(fi->resrv+4), GLONG(fi->resrv+8));

+ 3 - 3
sys/src/cmd/execnet/fs.c

@@ -164,7 +164,7 @@ fsread(Req *r)
 	path = r->fid->qid.path;
 	switch(TYPE(path)){
 	default:
-		snprint(e, sizeof e, "bug in execnet path=%lux", path);
+		snprint(e, sizeof e, "bug in execnet path=%lx", path);
 		respond(r, e);
 		break;
 
@@ -224,7 +224,7 @@ fswrite(Req *r)
 	path = r->fid->qid.path;
 	switch(TYPE(path)){
 	default:
-		snprint(e, sizeof e, "bug in execnet path=%lux", path);
+		snprint(e, sizeof e, "bug in execnet path=%lx", path);
 		respond(r, e);
 		break;
 
@@ -350,7 +350,7 @@ fsopen(Req *r)
 		r->fid->qid.path = path;
 		r->ofcall.qid.path = path;
 		if(fsdebug)
-			fprint(2, "open clone => path=%lux\n", path);
+			fprint(2, "open clone => path=%lx\n", path);
 		t = &tab[Qctl];
 		/* fall through */
 	default:

+ 1 - 1
sys/src/cmd/fossil/source.c

@@ -640,7 +640,7 @@ sourceGrowDepth(Source *r, Block *p, Entry *e, int depth)
 		bb = cacheAllocBlock(r->fs->cache, type+1, tag, r->fs->ehi, r->fs->elo);
 		if(bb == nil)
 			break;
-//fprint(2, "alloc %lux grow %V\n", bb->addr, b->score);
+//fprint(2, "alloc %lx grow %V\n", bb->addr, b->score);
 		memmove(bb->data, b->score, VtScoreSize);
 		memmove(e->score, bb->score, VtScoreSize);
 		e->depth++;

+ 6 - 6
sys/src/cmd/gzip/unzip.c

@@ -186,11 +186,11 @@ unztable(Biobuf *bin, char *file)
 				print("\tmethod %d\n", zh.meth);
 				print("\tmod time %d\n", zh.modtime);
 				print("\tmod date %d\n", zh.moddate);
-				print("\tcrc %lux\n", zh.crc);
+				print("\tcrc %lx\n", zh.crc);
 				print("\tcompressed size %lu\n", zh.csize);
 				print("\tuncompressed size %lu\n", zh.uncsize);
 				print("\tinternal attributes %x\n", zh.iattr);
-				print("\texternal attributes %lux\n", zh.eattr);
+				print("\texternal attributes %lx\n", zh.eattr);
 				print("\tstarts at %ld\n", zh.off);
 			}
 		}
@@ -259,11 +259,11 @@ sunztable(Biobuf *bin)
 				print("\tmethod %d\n", zh.meth);
 				print("\tmod time %d\n", zh.modtime);
 				print("\tmod date %d\n", zh.moddate);
-				print("\tcrc %lux\n", zh.crc);
+				print("\tcrc %lx\n", zh.crc);
 				print("\tcompressed size %lu\n", zh.csize);
 				print("\tuncompressed size %lu\n", zh.uncsize);
 				if((zh.flags & ZTrailInfo) && (hcrc || hcsize || huncsize)){
-					print("\theader crc %lux\n", zh.crc);
+					print("\theader crc %lx\n", zh.crc);
 					print("\theader compressed size %lu\n", zh.csize);
 					print("\theader uncompressed size %lu\n", zh.uncsize);
 				}
@@ -592,7 +592,7 @@ cheader(Biobuf *bin, ZipHead *zh)
 	if(v != ZCHeader){
 		if(v == ZECHeader)
 			return 0;
-		error("bad magic number %lux", v);
+		error("bad magic number %lx", v);
 	}
 	zh->madevers = get1(bin);
 	zh->madeos = get1(bin);
@@ -634,7 +634,7 @@ header(Biobuf *bin, ZipHead *zh)
 	if(v != ZHeader){
 		if(v == ZCHeader)
 			return 0;
-		error("bad magic number %lux at %lld", v, Boffset(bin)-4);
+		error("bad magic number %lx at %lld", v, Boffset(bin)-4);
 	}
 	zh->extvers = get1(bin);
 	zh->extos = get1(bin);

+ 1 - 1
sys/src/cmd/ip/dhcpclient.c

@@ -494,7 +494,7 @@ parse(uint8_t *p, int n)
 	}
 
 	if(dhcp.xid != nhgetl(bp->xid)) {
-		fprint(2, "dhcpclient: parse: bad xid: got %x expected %lux\n",
+		fprint(2, "dhcpclient: parse: bad xid: got %x expected %lx\n",
 			nhgetl(bp->xid), dhcp.xid);
 		return 0;
 	}

+ 1 - 1
sys/src/cmd/ip/httpd/hints.c

@@ -291,7 +291,7 @@ hintprint(HConnect *hc, Hio *hout, char *uri, int thresh, int havej)
 			continue;
 		}
 		close(fd);
-		snprint(etag, sizeof(etag), "\"%lluxv%lux\"", dir->qid.path, dir->qid.vers);
+		snprint(etag, sizeof(etag), "\"%lluxv%lx\"", dir->qid.path, dir->qid.vers);
 		siz = (int)( log((double)dir->length) * RECIPLOG2 + 0.9999);
 		free(dir);
 		if(strncmp(uri,sf,prefix)==0 && strchr(sf+prefix,'/')==0 && sf[prefix]!=0)

+ 1 - 1
sys/src/cmd/ip/httpd/sendfd.c

@@ -74,7 +74,7 @@ sendfd(HConnect *c, int fd, Dir *dir, HContent *type, HContent *enc)
 		if(type == nil)
 			type = hmkcontent(c, "application", "octet-stream", nil);
 
-		snprint(etag, sizeof(etag), "\"%lluxv%lux\"", qid.path, qid.vers);
+		snprint(etag, sizeof(etag), "\"%lluxv%lx\"", qid.path, qid.vers);
 		ok = checkreq(c, type, enc, mtime, etag);
 		if(ok <= 0){
 			close(fd);

+ 1 - 1
sys/src/cmd/ip/httpfile.c

@@ -559,7 +559,7 @@ fsread(Req *r)
 		sendp(reqchan, r);
 		break;
 	default:
-		snprint(e, sizeof(e), "bug in fsread path=%lux", path);
+		snprint(e, sizeof(e), "bug in fsread path=%lx", path);
 		respond(r, e);
 		break;
 	}

+ 1 - 1
sys/src/cmd/ip/snoopy/bootp.c

@@ -161,7 +161,7 @@ p_seprint(Msg *m)
 		demux(p_mux, x, x, m, &dump);
 	}
 
-	m->p = seprint(m->p, m->e, "t=%s ht=%d hl=%d hp=%d xid=%x sec=%d fl=%4.4ux ca=%V ya=%V sa=%V ga=%V cha=%E magic=%lux",
+	m->p = seprint(m->p, m->e, "t=%s ht=%d hl=%d hp=%d xid=%x sec=%d fl=%4.4ux ca=%V ya=%V sa=%V ga=%V cha=%E magic=%lx",
 		op(h->op), h->htype, h->hlen, h->hops,
 		NetL(h->xid), NetS(h->secs), NetS(h->flags),
 		h->ciaddr, h->yiaddr, h->siaddr, h->giaddr, h->chaddr,

+ 1 - 1
sys/src/cmd/jpg/onechan.c

@@ -119,7 +119,7 @@ load(Image *image, Memimage *memimage)
 
 	switch(chan){
 	default:
-		werrstr("can't handle image type 0x%lux", chan);
+		werrstr("can't handle image type 0x%lx", chan);
 		goto Err;
 	case RGB16:
 		for(i=0; i<ri.chanlen; i++, p+=2){

+ 1 - 1
sys/src/cmd/mk/graph.c

@@ -46,7 +46,7 @@ applyrules(char *target, char *cnt)
 	char stem[NAMEBLOCK], buf[NAMEBLOCK];
 	Resub rmatch[NREGEXP];
 
-/*	print("applyrules(%lux='%s')\n", target, target);/**/
+/*	print("applyrules(%lx='%s')\n", target, target);/**/
 	sym = symlook(target, S_NODE, 0);
 	if(sym)
 		return sym->u.ptr;

+ 1 - 1
sys/src/cmd/paqfs/paqfs.c

@@ -1006,7 +1006,7 @@ readHeader(PaqHeader *hdr, char *name, DigestState *ds)
 		sha1(buf, HeaderSize, 0, ds);
 	getHeader(buf, hdr);
 	if(hdr->magic != HeaderMagic)
-		sysfatal("bad header magic 0x%lux: %s", hdr->magic, name);
+		sysfatal("bad header magic 0x%lx: %s", hdr->magic, name);
 	if(hdr->version != Version)
 		sysfatal("unknown file version: %s", name);
 }

+ 3 - 3
sys/src/cmd/scuzz/scuzz.c

@@ -1271,14 +1271,14 @@ cmdtrackinfo(ScsiReq *rp, int argc, char *argv[])
 	Bprint(&bout, "buffer length: 0x%X\n", d[0]);
 	Bprint(&bout, "number of tracks: 0x%X\n", d[1]);
 	ul = (d[2]<<24)|(d[3]<<16)|(d[4]<<8)|d[5];
-	Bprint(&bout, "start address: 0x%luX\n", ul);
+	Bprint(&bout, "start address: 0x%lX\n", ul);
 	ul = (d[6]<<24)|(d[7]<<16)|(d[8]<<8)|d[9];
-	Bprint(&bout, "track length: 0x%luX\n", ul);
+	Bprint(&bout, "track length: 0x%lX\n", ul);
 	Bprint(&bout, "track mode: 0x%X\n", d[0x0A] & 0x0F);
 	Bprint(&bout, "track status: 0x%X\n", (d[0x0A]>>4) & 0x0F);
 	Bprint(&bout, "data mode: 0x%X\n", d[0x0B] & 0x0F);
 	ul = (d[0x0C]<<24)|(d[0x0D]<<16)|(d[0x0E]<<8)|d[0x0F];
-	Bprint(&bout, "free blocks: 0x%luX\n", ul);
+	Bprint(&bout, "free blocks: 0x%lX\n", ul);
 	return n;
 }
 

+ 3 - 3
sys/src/cmd/ssh1/sshnet.c

@@ -707,7 +707,7 @@ fsread(Req *r)
 	path = r->fid->qid.path;
 	switch(TYPE(path)){
 	default:
-		snprint(e, sizeof e, "bug in fsread path=%lux", path);
+		snprint(e, sizeof e, "bug in fsread path=%lx", path);
 		respond(r, e);
 		break;
 
@@ -761,7 +761,7 @@ fswrite(Req *r)
 	path = r->fid->qid.path;
 	switch(TYPE(path)){
 	default:
-		snprint(e, sizeof e, "bug in fswrite path=%lux", path);
+		snprint(e, sizeof e, "bug in fswrite path=%lx", path);
 		respond(r, e);
 		break;
 
@@ -812,7 +812,7 @@ fsopen(Req *r)
 		r->fid->qid.path = path;
 		r->ofcall.qid.path = path;
 		if(chatty9p)
-			fprint(2, "open clone => path=%lux\n", path);
+			fprint(2, "open clone => path=%lx\n", path);
 		t = &tab[Qctl];
 		/* fall through */
 	default:

+ 1 - 1
sys/src/cmd/tweak.c

@@ -1841,7 +1841,7 @@ tchar(Thing *t)
 	d -= t->off;
 	while(c <= d){
 		if(c>=t->s->n){
-			mesg("0x%lux not in font %s", c+t->off, t->name);
+			mesg("0x%lx not in font %s", c+t->off, t->name);
 			return;
 		}
 		openedit(t, Pt(0, 0), c);

+ 1 - 1
sys/src/cmd/venti/srv/arena.c

@@ -694,7 +694,7 @@ loadarena(Arena *arena)
 			logerr(ECorrupt, "arena tail name %s head %s", 
 				arena->name, head.name);
 		else if(arena->clumpmagic != head.clumpmagic)
-			logerr(ECorrupt, "arena %d tail clumpmagic 0x%lux head 0x%lux",
+			logerr(ECorrupt, "arena %d tail clumpmagic 0x%lx head 0x%lx",
 				debugarena, (uint32_t)arena->clumpmagic,
 				(uint32_t)head.clumpmagic);
 		else if(arena->version != head.version)

+ 2 - 2
sys/src/cmd/venti/srv/conv.c

@@ -236,7 +236,7 @@ _packarena(Arena *arena, uint8_t *buf, int forceext)
 	case ArenaVersion4:
 		sz = ArenaSize4;
 		if(arena->clumpmagic != _ClumpMagic)
-			fprint(2, "warning: writing old arena tail loses clump magic 0x%lux != 0x%lux\n",
+			fprint(2, "warning: writing old arena tail loses clump magic 0x%lx != 0x%lx\n",
 				(uint32_t)arena->clumpmagic,
 			       (uint32_t)_ClumpMagic);
 		break;
@@ -372,7 +372,7 @@ packarenahead(ArenaHead *head, uint8_t *buf)
 	case ArenaVersion4:
 		sz = ArenaHeadSize4;
 		if(head->clumpmagic != _ClumpMagic)
-			fprint(2, "warning: writing old arena header loses clump magic 0x%lux != 0x%lux\n",
+			fprint(2, "warning: writing old arena header loses clump magic 0x%lx != 0x%lx\n",
 				(uint32_t)head->clumpmagic,
 			       (uint32_t)_ClumpMagic);
 		break;

+ 2 - 2
sys/src/cmd/venti/srv/dcache.c

@@ -317,8 +317,8 @@ dirtydblock(DBlock *b, int dirty)
 {
 	int odirty;
 
-	trace(TraceBlock, "dirtydblock enter %s 0x%llux %d from 0x%lux",
-		b->part->name, b->addr, dirty, getcallerpc(&b));
+	trace(TraceBlock, "dirtydblock enter %s 0x%llux %d from 0x%lx",
+		b->part->name, b->addr, dirty, getcallerpc());
 	assert(b->ref != 0);
 	assert(b->mode==ORDWR || b->mode==OWRITE);
 

+ 3 - 3
sys/src/cmd/vnc/auth.c

@@ -164,9 +164,9 @@ vncauth(Vnc *v, char *keypattern)
 	auth = vncrdlong(v);
 	switch(auth){
 	default:
-		werrstr("unknown auth type 0x%lux", auth);
+		werrstr("unknown auth type 0x%lx", auth);
 		if(verbose)
-			fprint(2, "unknown auth type 0x%lux", auth);
+			fprint(2, "unknown auth type 0x%lx", auth);
 		return -1;
 
 	case AFailed:
@@ -201,7 +201,7 @@ vncauth(Vnc *v, char *keypattern)
 		auth = vncrdlong(v);
 		switch(auth){
 		default:
-			werrstr("unknown server response 0x%lux", auth);
+			werrstr("unknown server response 0x%lx", auth);
 			return -1;
 		case VncAuthFailed:
 			werrstr("server says authentication failed");

+ 3 - 3
sys/src/cmd/webfs/fs.c

@@ -211,7 +211,7 @@ fsread(Req *r)
 	path = r->fid->qid.path;
 	switch(TYPE(path)){
 	default:
-		snprint(e, sizeof e, "bug in webfs path=%lux\n", path);
+		snprint(e, sizeof e, "bug in webfs path=%lx\n", path);
 		respond(r, e);
 		break;
 
@@ -300,7 +300,7 @@ fswrite(Req *r)
 	path = r->fid->qid.path;
 	switch(TYPE(path)){
 	default:
-		snprint(e, sizeof e, "bug in webfs path=%lux\n", path);
+		snprint(e, sizeof e, "bug in webfs path=%lx\n", path);
 		respond(r, e);
 		break;
 
@@ -411,7 +411,7 @@ fsopen(Req *r)
 		r->fid->qid.path = path;
 		r->ofcall.qid.path = path;
 		if(fsdebug)
-			fprint(2, "open clone => path=%lux\n", path);
+			fprint(2, "open clone => path=%lx\n", path);
 		t = &tab[Qctl];
 		/* fall through */
 	default:

+ 1 - 1
sys/src/libdisk/scsi.c

@@ -181,7 +181,7 @@ _scsicmd(Scsi *s, uint8_t *cmd, int ccount, void *data, int dcount,
 	if(status == 0)
 		return n;
 
-	werrstr("cmd %2.2uX: status %luX dcount %d n %d", cmd[0], status, dcount, n);
+	werrstr("cmd %2.2uX: status %lX dcount %d n %d", cmd[0], status, dcount, n);
 	return -1;
 }
 

+ 7 - 7
sys/src/libmach/8db.c

@@ -1770,7 +1770,7 @@ plocal(Instr *ip)
 
 	offset = ip->disp;
 	if (!findsym(ip->addr, CTEXT, &s) || !findlocal(&s, FRAMENAME, &s)) {
-		bprint(ip, "%lux(SP)", offset);
+		bprint(ip, "%lx(SP)", offset);
 		return;
 	}
 
@@ -1786,7 +1786,7 @@ plocal(Instr *ip)
 		bprint(ip, "%s+", s.name);
 	else
 		offset = ip->disp;
-	bprint(ip, "%lux%s", offset, reg);
+	bprint(ip, "%lx%s", offset, reg);
 }
 
 static int
@@ -1860,7 +1860,7 @@ immediate(Instr *ip, int64_t val)
 			w = -w;
 		if (issymref(ip, &s, w, val)) {
 			if (w)
-				bprint(ip, "%s+%lux(SB)", s.name, w);
+				bprint(ip, "%s+%lx(SB)", s.name, w);
 			else
 				bprint(ip, "%s(SB)", s.name);
 			return;
@@ -1871,14 +1871,14 @@ immediate(Instr *ip, int64_t val)
 			if (w < 0)
 				w = -w;
 			if (w < 4096) {
-				bprint(ip, "%s-%lux(SB)", s.name, w);
+				bprint(ip, "%s-%lx(SB)", s.name, w);
 				return;
 			}
 		}
 */
 	}
 	if((ip->rex & REXW) == 0)
-		bprint(ip, "%lux", (int32_t)val);
+		bprint(ip, "%lx", (int32_t)val);
 	else
 		bprint(ip, "%llux", val);
 }
@@ -1903,7 +1903,7 @@ pea(Instr *ip)
 		if (ip->base < 0)
 			immediate(ip, ip->disp);
 		else {
-			bprint(ip, "%lux", ip->disp);
+			bprint(ip, "%lx", ip->disp);
 			if(ip->rip)
 				bprint(ip, "(RIP)");
 			bprint(ip,"(%s%s)", ANAME(ip), reg[ip->rex&REXB? ip->base+8: ip->base]);
@@ -1989,7 +1989,7 @@ prinstr(Instr *ip, char *fmt)
 				bprint(ip, "CBW");
 			break;
 		case 'd':
-			bprint(ip,"%x:%lux",ip->seg,ip->disp);
+			bprint(ip,"%x:%lx",ip->seg,ip->disp);
 			break;
 		case 'm':
 			if (ip->mod == 3 && ip->osize != 'B') {

+ 2 - 2
sys/src/libmach/machdata.c

@@ -94,7 +94,7 @@ symoff(char *buf, int n, uint64_t v, int space)
 	if (s.type != 't' && s.type != 'T' && delta >= 4096)
 		return snprint(buf, n, "%llux", v);
 	else if (delta)
-		return snprint(buf, n, "%s+%lux", s.name, delta);
+		return snprint(buf, n, "%s+%lx", s.name, delta);
 	else
 		return snprint(buf, n, "%s", s.name);
 }
@@ -120,7 +120,7 @@ fpformat(Map *map, Reglist *rp, char *buf, int n, int modif)
 	case 'X':
 		if (get4(map, rp->roffs, &r) < 0)
 			return -1;
-		snprint(buf, n, "%lux", r);
+		snprint(buf, n, "%lx", r);
 		break;
 	case 'F':	/* first reg of double reg pair */
 		if (modif == 'F')

+ 10 - 12
sys/src/libmemdraw/draw.c

@@ -100,7 +100,7 @@ memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point p0, Memimage *mask
 	if(mask == nil)
 		mask = memopaque;
 
-DBG	print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->chan, r, dst->data->bdata, src, src->chan, p0, mask, mask->chan, p1);
+	DBG	print("memimagedraw %p/%lX %R @ %p %p/%lX %P %p/%lX %P... ", dst, dst->chan, r, dst->data->bdata, src, src->chan, p0, mask, mask->chan, p1);
 
 	if(drawclip(dst, &r, src, &p0, mask, &p1, &par.sr, &par.mr) == 0){
 //		if(drawdebug)
@@ -152,9 +152,7 @@ DBG	print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch
 		}
 	}
 
-//	if(drawdebug)
-//		iprint("dr %R sr %R mr %R...", r, par.sr, par.mr);
-DBG print("draw dr %R sr %R mr %R %lux\n", r, par.sr, par.mr, par.state);
+	DBG print("draw dr %R sr %R mr %R %lx\n", r, par.sr, par.mr, par.state);
 
 	/*
 	 * Now that we've clipped the parameters down to be consistent, we 
@@ -679,7 +677,7 @@ alphadraw(Memdrawparam *par)
 	 * but it avoids a fair amount of code duplication to make this a case here
 	 * rather than have a separate booldraw.
 	 */
-	DBG print("flag %lu mchan %lux=?%x dd %d\n", src->flags&Falpha, mask->chan, GREY1, dst->depth);
+	DBG print("flag %lu mchan %lx=?%x dd %d\n", src->flags&Falpha, mask->chan, GREY1, dst->depth);
 	if(!(src->flags&Falpha) && mask->chan == GREY1 && dst->depth >= 8 && op == SoverD){
 //if(drawdebug) iprint("boolcopy...");
 		rdsrc = convfn(dst, &z->dpar, src, &z->spar, &ndrawbuf);
@@ -2100,7 +2098,7 @@ memoptdraw(Memdrawparam *par)
 	dst = par->dst;
 	op = par->op;
 
-DBG print("state %lux mval %lux dd %d\n", par->state, par->mval, dst->depth);
+	DBG print("state %lx mval %lx dd %d\n", par->state, par->mval, dst->depth);
 	/*
 	 * If we have an opaque mask and source is one opaque pixel we can convert to the
 	 * destination format and just replicate with memset.
@@ -2150,7 +2148,7 @@ DBG print("dx %d Dx %d\n", dx, Dx(par->r));
 
 				for(y=0; y<dy; y++, dp+=dwid){
 					if(lm){
-						DBG print("dp %p v %lux lm %x (v ^ *dp) & lm %lux\n", dp, v, lm, (v^*dp)&lm);
+						DBG print("dp %p v %lx lm %x (v ^ *dp) & lm %lx\n", dp, v, lm, (v^*dp)&lm);
 						*dp ^= (v ^ *dp) & lm;
 						dp++;
 					}
@@ -2354,7 +2352,7 @@ chardraw(Memdrawparam *par)
 	Rectangle r, mr;
 	Memimage *mask, *src, *dst;
 
-if(0) if(drawdebug) iprint("chardraw? mf %lux md %d sf %lux dxs %d dys %d dd %d ddat %p sdat %p\n",
+DBG print("chardraw? mf %lx md %d sf %lx dxs %d dys %d dd %d ddat %p sdat %p\n",
 		par->mask->flags, par->mask->depth, par->src->flags, 
 		Dx(par->src->r), Dy(par->src->r), par->dst->depth, par->dst->data, par->src->data);
 
@@ -2419,7 +2417,7 @@ DBG print("bsh %d\n", bsh);
 				i = x&7;
 				if(i == 8-1)
 					bits = *q++;
-DBG print("bits %lux sh %d...", bits, i);
+				DBG print("bits %lx sh %d...", bits, i);
 				if((bits>>i)&1)
 					*wc = v;
 			}
@@ -2431,7 +2429,7 @@ DBG print("bits %lux sh %d...", bits, i);
 				i = x&7;
 				if(i == 8-1)
 					bits = *q++;
-DBG print("bits %lux sh %d...", bits, i);
+				DBG print("bits %lx sh %d...", bits, i);
 				if((bits>>i)&1)
 					*ws = v;
 			}
@@ -2442,7 +2440,7 @@ DBG print("bits %lux sh %d...", bits, i);
 				i = x&7;
 				if(i == 8-1)
 					bits = *q++;
-DBG print("bits %lux sh %d...", bits, i);
+				DBG print("bits %lx sh %d...", bits, i);
 				if((bits>>i)&1){
 					wc[0] = sp[0];
 					wc[1] = sp[1];
@@ -2457,7 +2455,7 @@ DBG print("bits %lux sh %d...", bits, i);
 				i = x&7;
 				if(i == 8-1)
 					bits = *q++;
-DBG iprint("bits %lux sh %d...", bits, i);
+				DBG iprint("bits %lx sh %d...", bits, i);
 				if((bits>>i)&1)
 					*wl = v;
 			}

+ 6 - 6
sys/src/libmemdraw/drawtest.c

@@ -124,7 +124,7 @@ main(int argc, char *argv[])
 	stmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(schan));
 	mtmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan));
 	ones = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan));
-//	print("chan %lux %lux %lux %lux %lux %lux\n", dst->chan, src->chan, mask->chan, stmp->chan, mtmp->chan, ones->chan);
+//	print("chan %lx %lx %lx %lx %lx %lx\n", dst->chan, src->chan, mask->chan, stmp->chan, mtmp->chan, ones->chan);
 	if(dst==0 || src==0 || mask==0 || mtmp==0 || ones==0) {
 	Alloc:
 		fprint(2, "dtest: allocation failed: %r\n");
@@ -921,13 +921,13 @@ DBG print("v %.8lux...", v);
 		npack = 8/bpp;
 		sh = bpp*(npack - pt.x%npack - 1);
 		bits = RGB2K(r,g,b);
-DBG print("repl %lux 8 %d = %lux...", bits, bpp, replbits(bits, 8, bpp));
+DBG print("repl %lx 8 %d = %lx...", bits, bpp, replbits(bits, 8, bpp));
 		bits = replbits(bits, 8, bpp);
 		mask = (1<<bpp)-1;
-DBG print("bits %lux mask %lux sh %d...", bits, mask, sh);
+DBG print("bits %lx mask %lx sh %d...", bits, mask, sh);
 		mask <<= sh;
 		bits <<= sh;
-DBG print("(%lux & %lux) | (%lux & %lux)", v, ~mask, bits, mask);
+DBG print("(%lx & %lx) | (%lx & %lx)", v, ~mask, bits, mask);
 		v = (v & ~mask) | (bits & mask);
 	} else {
 		/*
@@ -965,11 +965,11 @@ DBG print("(%lux & %lux) | (%lux & %lux)", v, ~mask, bits, mask);
 				abort();
 			}
 
-DBG print("repl %lux 8 %d = %lux...", bits, nbits, replbits(bits, 8, nbits));
+DBG print("repl %lx 8 %d = %lx...", bits, nbits, replbits(bits, 8, nbits));
 			if(TYPE(c) != CMap)
 				bits = replbits(bits, 8, nbits);
 			mask = (1<<nbits)-1;
-DBG print("bits %lux mask %lux sh %d...", bits, mask, sh);
+DBG print("bits %lx mask %lx sh %d...", bits, mask, sh);
 			bits <<= sh;
 			mask <<= sh;
 			v = (v & ~mask) | (bits & mask);

+ 2 - 2
sys/src/libventi/file.c

@@ -673,7 +673,7 @@ mkindices(VtEntry *e, uint32_t bn, int *index)
 	np = e->psize/VtScoreSize;
 	for(i=0; bn > 0; i++){
 		if(i >= VtPointerDepth){
-			werrstr("bad address 0x%lux", (uint32_t)bn);
+			werrstr("bad address 0x%lx", (uint32_t)bn);
 			return -1;
 		}
 		index[i] = bn % np;
@@ -703,7 +703,7 @@ vtfileblock(VtFile *r, uint32_t bn, int mode)
 		goto Err;
 	if(i > DEPTH(e.type)){
 		if(mode == VtOREAD){
-			werrstr("bad address 0x%lux", (uint32_t)bn);
+			werrstr("bad address 0x%lx", (uint32_t)bn);
 			goto Err;
 		}
 		index[i] = 0;