shithub: 9pro

Download patch

ref: c7a2f580d6da01b22b3feeae72cbe53714e1ca97
parent: a9458abd4c7cbe07421245271b22887657ae345c
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed May 20 10:29:31 EDT 2020

9gc: ctxread: print the error

--- a/9pex.c
+++ b/9pex.c
@@ -562,10 +562,12 @@
 		if ((r = read(in, rdbuf+n, size-n)) <= 0) {
 			if (r == EINTR)
 				continue;
-			if (r == 0)
+			if (r == 0) {
 				eof = 1;
-			else
+			} else {
 				*err = 1;
+				perror("ctxread");
+			}
 			return NULL;
 		}
 	}