shithub: riscv

Download patch

ref: 26c78402c0785ef98def173496b19d70aac276e5
parent: 1c738e2a16487b42a030e4b71c3caaad9c7eb446
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Dec 18 17:15:41 EST 2022

dossrv: post to /srv instead of #s, leave stderror alone

--- a/sys/src/cmd/dossrv/xfssrv.c
+++ b/sys/src/cmd/dossrv/xfssrv.c
@@ -18,7 +18,7 @@
 uchar	statbuf[STATMAX];
 int	errno;
 char	errbuf[ERRMAX];
-char	srvfile[64];
+char	srvfile[128];
 char	*deffile;
 int	doabort;
 int	trspaces;
@@ -80,9 +80,9 @@
 	}ARGEND
 
 	if(argc == 0)
-		strcpy(srvfile, "#s/dos");
+		snprint(srvfile, sizeof srvfile, "/srv/dos");
 	else if(argc == 1)
-		snprint(srvfile, sizeof srvfile, "#s/%s", argv[0]);
+		snprint(srvfile, sizeof srvfile, "/srv/%s", argv[0]);
 	else
 		usage();
 
@@ -109,11 +109,6 @@
 		_exits(nil);
 	case 0:
 		break;
-	}
-
-	if(!chatty){
-		close(2);
-		open("#c/cons", OWRITE);
 	}
 
 	io();