git: 9front

Download patch

ref: 522c12ee4acdc2ef6a5771f378a3c55c948c52d9
parent: 1ee3474ad139fa02887e625ec55a6395cb6fbc1a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Sep 18 12:54:24 EDT 2016

cpu: quote remaining remote command arguments, don't syslog on missing /mnt/term/dev/cpunote file

--- a/sys/src/cmd/cpu.c
+++ b/sys/src/cmd/cpu.c
@@ -198,7 +198,7 @@
 		*s++ = '!';
 		*s = 0;
 		while(p = ARGF())
-			s = seprint(s, cmd+sizeof(cmd), " %s", p);
+			s = seprint(s, cmd+sizeof(cmd), " %q", p);
 		break;
 	case 'k':
 		keyspec = smprint("%s %s", keyspec, EARGF(usage()));
@@ -783,10 +783,8 @@
 		_exits(0);
 	case 0:
 		fd = open(rmtnotefile, OREAD);
-		if(fd < 0){
-			syslog(0, "cpu", "cpu -R: can't open %s", rmtnotefile);
+		if(fd < 0)
 			_exits(0);
-		}
 	
 		for(;;){
 			n = read(fd, buf, sizeof(buf)-1);
--