Browse Source

Plan 9 from Bell Labs 2010-03-11

David du Colombier 14 years ago
parent
commit
88f5d93d45

+ 1 - 1
sys/src/9/pc/mmu.c

@@ -646,7 +646,7 @@ vunmap(void *v, int size)
 	
 	if(size < 0 || va < VMAP || va+size > VMAP+VMAPSIZE)
 		panic("vunmap va=%#.8lux size=%#x pc=%#.8lux",
-			va, size, getcallerpc(&va));
+			va, size, getcallerpc(&v));
 
 	pdbunmap(MACHP(0)->pdb, va, size);
 	

+ 1 - 3
sys/src/9/port/debugalloc.c

@@ -675,9 +675,7 @@ recur(Bhdr *t)
 {
 	if(t == 0)
 		return 1;
-	if(((ulong)t) < 0x80000000)
-		return 0;
-	if(((ulong)t) > 0x90000000)
+	if((uintptr)t < KZERO || (uintptr)t - KZERO > 0x10000000)
 		return 0;
 	return recur(t->right) && recur(t->left);
 }

+ 2 - 1
sys/src/cmd/clock.c

@@ -72,7 +72,8 @@ main(int, char**)
 	int key, timer;
 	int t;
 
-	initdraw(0,0,"clock");
+	if (initdraw(0, 0, "clock") < 0)
+		sysfatal("initdraw failed");
 	back = allocimagemix(display, DPalebluegreen, DWhite);
 
 	hrhand = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DDarkblue);

+ 2 - 1
sys/src/cmd/mug.c

@@ -1040,7 +1040,8 @@ main(int argc, char **argv)
 	}else
 		fd = 0;
 
-	initdraw(0, 0, "mug");
+	if (initdraw(0, 0, "mug") < 0)
+		sysfatal("initdraw failed");
 
 	if((orig = readimage(display, fd, 0)) == nil)
 		sysfatal("readimage: %r");

+ 1 - 1
sys/src/cmd/ndb/dnsdebug.c

@@ -144,7 +144,7 @@ prettyrrfmt(Fmt *f)
 		rrname(rp->type, buf, sizeof buf));
 
 	if(rp->negative){
-		seprint(p, e, "negative rcode %d\n", rp->negrcode);
+		seprint(p, e, "negative rcode %d", rp->negrcode);
 		goto out;
 	}
 

+ 1 - 1
sys/src/libdraw/init.c

@@ -115,7 +115,7 @@ initdraw(void(*error)(Display*, char*), char *fontname , char *label)
 	char *dev = "/dev";
 
 	if(access("/dev/draw/new", AEXIST)<0 && bind("#i", "/dev", MAFTER)<0){
-		fprint(2, "imageinit: can't bind /dev/draw: %r");
+		fprint(2, "imageinit: can't bind /dev/draw: %r\n");
 		return -1;
 	}
 	return geninitdraw(dev, error, fontname, label, dev, Refnone);