Browse Source

Fixed drawterm not working

boot.c was always booting as a terminal server.  It now
requires the service=cpu/terminal parameter in the append string.

Change-Id: Id41057040f72216f73f791b5d01950336a31716c
Signed-off-by: Keith Poole <keith.poole@gmail.com>
Keith Poole 8 years ago
parent
commit
2ae2055752
4 changed files with 4 additions and 7 deletions
  1. 0 4
      sys/src/9/amd64/main.c
  2. 1 1
      sys/src/9/boot/boot.c
  3. 2 1
      sys/src/cmd/init.c
  4. 1 1
      util/GO9PRUN

+ 0 - 4
sys/src/9/amd64/main.c

@@ -663,10 +663,6 @@ init0(void)
 		loadenv(oargc, oargv);
 		ksetenv("terminal", buf, 0);
 		ksetenv("cputype", cputype, 0);
-		if(cpuserver)
-			ksetenv("service", "cpu", 0);
-		else
-			ksetenv("service", "terminal", 0);
 		ksetenv("pgsz", "2097152", 0);
 		// no longer. 	confsetenv();
 		poperror();

+ 1 - 1
sys/src/9/boot/boot.c

@@ -168,7 +168,7 @@ print("\n");
 	cmd = getenv("init");
 	srvt = strcmp(service, "terminal");
 	if(cmd == nil){
-		if(srvt) {
+		if(!srvt) {
 			sprint(cmdbuf, "/%s/bin/init -%s%s", cputype,
 				"t", mflag ? "m" : "");
 			cmd = cmdbuf;

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

@@ -72,8 +72,9 @@ main(int argc, char *argv[])
 	newns(user, 0);
 	iscpu = strcmp(service, "cpu")==0;
 
-	if(iscpu && manual == 0)
+	if(iscpu && manual == 0){
 		fexec(cpustart);
+	}
 
 	for(;;){
 		print("\ninit: starting /bin/rc\n");

+ 1 - 1
util/GO9PRUN

@@ -24,7 +24,7 @@ $kvmdo qemu-system-x86_64 -s -cpu Opteron_G1 -smp 1 -m 2048 $kvmflag \
 -redir tcp:9999::9 \
 -redir tcp:17010::17010 \
 -redir tcp:17013::17013 \
--append "nobootprompt=tcp maxcores=1024 fs=10.0.2.2 auth=10.0.2.2 nvram=/boot/nvram nvrlen=512 nvroff=0" \
+-append "service=cpu nobootprompt=tcp maxcores=1024 fs=10.0.2.2 auth=10.0.2.2 nvram=/boot/nvram nvrlen=512 nvroff=0" \
 -kernel harvey.32bit $*
 EOF