shithub: drawterm

Download patch

ref: 261a80f05dcfb2bc8fa98093a293abfc67f24394
parent: 6ffcc16c81afebbe735eaed7622659b144edaf07
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon May 30 02:35:39 EDT 2016

remove unreachable sysfatal() calls after exportfs(), exits(nil) on eof in exportfs

--- a/cpu.c	Sun May 29 22:55:26 2016
+++ b/cpu.c	Mon May 30 02:35:39 2016
@@ -148,7 +148,6 @@
 
 	/* Begin serving the namespace */
 	exportfs(fd);
-	sysfatal("starting exportfs: %r");
 }
 
 void
@@ -202,7 +201,6 @@
 
 	/* Begin serving the gnot namespace */
 	exportfs(fd);
-	sysfatal("starting exportfs: %r");
 }
 
 void
--- a/exportfs/exportfs.c	Sun May 29 22:55:26 2016
+++ b/exportfs/exportfs.c	Mon May 30 02:35:39 2016
@@ -80,7 +80,7 @@
 		DEBUG(DFD, "read9p...");
 		n = read9pmsg(netfd, r->buf, messagesize);
 		if(n <= 0)
-			fatal("eof: n=%d %r", n);
+			fatal(nil);
 
 		if(convM2S(r->buf, n, &r->work) == 0){
 			iprint("convM2S %d byte message\n", n);
@@ -489,7 +489,7 @@
 	char buf[ERRMAX];
 	va_list arg;
 
-	if (s) {
+	if (s != nil) {
 		va_start(arg, s);
 		vsnprint(buf, ERRMAX, s, arg);
 		va_end(arg);
@@ -499,10 +499,10 @@
 //	for(m = Proclist; m; m = m->next)
 //		postnote(PNPROC, m->pid, "kill");
 
-	DEBUG(DFD, "%s\n", buf);
-	if (s) 
-		sysfatal(buf);
-	else
-		sysfatal("");
+	if (s != nil) { 
+		DEBUG(DFD, "%s\n", buf);
+		sysfatal("%s", buf);
+	} else
+		exits(nil);
 }
 
--- a/exportfs/exportfs.h	Sun May 29 22:55:26 2016
+++ b/exportfs/exportfs.h	Mon May 30 02:35:39 2016
@@ -145,4 +145,4 @@
 
 #define notify(x)
 #define noted(x)
-#define exits(x)
+