From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out1.migadu.com ([91.121.223.63]) by ewsd; Sun Sep 13 09:16:02 EDT 2020 Message-ID: <8E560F5F58B63F024428E031D57CDB22@a-b.xyz> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a-b.xyz; s=key1; t=1600002956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Ekh/GPuWfweiyarOJjo+nwhfXb8kr6Z948N+0sm3f8=; b=g4gxAe8yx1Pp7druQQ6LQQ/XYPJspU9E5QOibtDsr3RcYNyJQvWmZkIz+8nI4dKevLm30a oCl8eumQlrkWGrN48Hn1GeSD+/v4YwbUxfbMOHjPqlxqZAx1kgsaWZ+dkquEt04Z9KgsAK XH3vUpHBjURPV+Ot1pIqdj3VtRsJZxeYPanflM8ZskAN6F2Iu7vXHT/y8nG6GlOTgIDqTF YDux7qzSr/QLUZ1/8C4k3wuXbzrPaOMdUSFyLC09c79z2w4LYG2YE6cAOvdTkZLYNNUULA BUf0VFvGbhhwg+oypMXTZoG+IhxLg4cT9nJ9yAFKr+PsqgVmTjIE+TcgWQWfZQ== To: 9front@9front.org Subject: [PATCH] syscall(1): remove '\n' from -o output Date: Sun, 13 Sep 2020 15:15:54 +0200 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: kvik@a-b.xyz MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Spam-Score: -0.10 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: agile TOR over ActivityPub out-scaling configuration solution When given the -o flag syscall(1) prints the buffer with an appended newline, making interactive usage misleading and scripting quite awkward. I propose removing the newline. The only program using syscall(1) in the base system is wloc(1), which works fine after the patch. However, it's likely that people have worked around this in their own scripts so the patch may break them. diff -r cd0da90ae546 sys/src/cmd/syscall/syscall.c --- a/sys/src/cmd/syscall/syscall.c Sat Sep 12 17:40:41 2020 -0700 +++ b/sys/src/cmd/syscall/syscall.c Sun Sep 13 14:55:34 2020 +0200 @@ -131,7 +131,7 @@ fprint(2, "syscall: return %lld, no error\n", r); } if(oflag) - print("%s\n", buf); + print("%s", buf); if(xflag){ for(j=0; j