shithub: riscv

Download patch

ref: 28f3a3aad8d2d73010f1c81080e92f71903f4556
parent: f99b9cae6a3dc5775a83b264d6041be8d5d416d6
author: cinap_lenrek <[email protected]>
date: Sun Mar 8 16:53:30 EDT 2020

boorc, nusbrc: fix wrong redirections after &

the rc & operator changes stdin to /dev/null, so we
have to do the <[0=1] inside the {}

this never showed up as an issue because many
fileservers just read 9p messages from standard
output.

--- a/sys/src/9/boot/local.rc
+++ b/sys/src/9/boot/local.rc
@@ -45,7 +45,7 @@
 }
 
 fn bootfs{
-	{$1 -s -f $*(2-) &} <[0=1] | echo 0 >/srv/boot
+	{$1 -s -f $*(2-) <[0=1] &} | echo 0 >/srv/boot
 }
 
 fn connectlocal{
--- a/sys/src/9/boot/nusbrc
+++ b/sys/src/9/boot/nusbrc
@@ -45,7 +45,7 @@
 						diskparts $dev
 						for(part in $dev/dos* $dev/9fat* $dev/data) if(test -r $part && ~ `{fstype $part} dos) {
 							mkdir -m 0700 '#σc/'^$dev || exit
-							{dossrv -s -f $part &} <[0=1] |
+							{dossrv -s -f $part <[0=1] &} |
 								echo 0 >'#σc/'^$dev/dos
 							exit
 						}