Browse Source

Plan 9 from Bell Labs 2012-10-23

David du Colombier 11 years ago
parent
commit
83023a40ea

+ 11 - 0
sys/lib/backup/backuparenas

@@ -17,6 +17,17 @@ unmount /mnt/cd >[2]/dev/null
 cdfs -d $1 || exit
 shift
 
+echo -n figuring out disc type...
+for (i in `{seq 1 6}) {
+	m=`{ls -l /mnt/cd | grep bd-r-dl}
+	if (~ $m '' ()) {
+		echo -n .
+		sleep 5
+	}
+}
+echo
+
+ls -l /mnt/cd
 grep next /mnt/cd/ctl
 echo -n 'nwa ok? '
 ok=`{read}

+ 1 - 1
sys/man/2/cputime

@@ -14,7 +14,7 @@ int	times(long t[4])
 double	cputime(void)
 .PP
 .B
-void	cycles(vlong *cyclep)
+void	cycles(uvlong *cyclep)
 .SH DESCRIPTION
 If
 .I t

+ 4 - 1
sys/src/9/port/devproc.c

@@ -387,6 +387,7 @@ procopen(Chan *c, int omode)
 		tc->offset = 0;
 		qunlock(&p->debug);
 		poperror();
+		cclose(c);
 		return tc;
 
 	case Qproc:
@@ -1184,8 +1185,10 @@ proctext(Chan *c, Proc *p)
 		error(Eprocdied);
 	}
 
-	if(p->pid != PID(c->qid))
+	if(p->pid != PID(c->qid)){
+		cclose(tc);
 		error(Eprocdied);
+	}
 
 	unlock(i);
 	poperror();

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

@@ -38,11 +38,11 @@ main(int, char **)
 	close(ctl);
 
 	if (fprint(wdog, "enable") < 0)
-		sysfatal("write #w/wdctl: %r");
+		sysfatal("write #w/wdctl enable: %r");
 	for(;;){
 		sleep(300);		/* allows 4.2GHz CPU, with some slop */
 		seek(wdog, 0, 0);
 		if (fprint(wdog, "restart") < 0)
-			sysfatal("write #w/wdctl: %r");
+			sysfatal("write #w/wdctl restart: %r");
 	}
 }

+ 2 - 1
sys/src/cmd/db/input.c

@@ -46,12 +46,13 @@ clrinp(void)
 int
 readrune(int fd, Rune *r)
 {
-	char buf[UTFmax];
+	char buf[UTFmax+1];
 	int i;
 
 	for(i=0; i<UTFmax && !fullrune(buf, i); i++)
 		if(read(fd, buf+i, 1) <= 0)
 			return -1;
+	buf[i] = 0;
 	chartorune(r, buf);
 	return 1;
 }

+ 2 - 2
sys/src/cmd/mklib

@@ -36,11 +36,11 @@ installall:V:
 		mk $stem
 
 nuke:V:
-	rm -f *.[$OS] y.tab.? y.output y.error
+	rm -f *.[$OS] y.tab.? y.output y.error $CLEANFILES
 	rm -f $LIB
 
 clean:V:
-	rm -f *.[$OS] y.tab.? y.output y.error
+	rm -f *.[$OS] y.tab.? y.output y.error $CLEANFILES
 
 update:V:
 	update $UPDATEFLAGS $UPDATE

+ 0 - 1
sys/src/libmemlayer/draw.c

@@ -3,7 +3,6 @@
 #include <draw.h>
 #include <memdraw.h>
 #include <memlayer.h>
-#include <pool.h>
 
 struct Draw
 {

+ 0 - 1
sys/src/libmemlayer/lhide.c

@@ -3,7 +3,6 @@
 #include <draw.h>
 #include <memdraw.h>
 #include <memlayer.h>
-#include <pool.h>
 
 /*
  * Hide puts that portion of screenr now on the screen into the window's save area.

+ 0 - 1
sys/src/libmemlayer/ltofront.c

@@ -3,7 +3,6 @@
 #include <draw.h>
 #include <memdraw.h>
 #include <memlayer.h>
-#include <pool.h>
 
 /*
  * Pull i towards top of screen, just behind front