git: 9front

Download patch

ref: 1dc9c1235a9b8651fd747b60797eb4382d2552d3
parent: cb9a06f4d2e8a744a58d2bf3928de3897e921c49
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jul 23 23:23:01 EDT 2016

swap: make sure swap chan has ORDWR mode on fdtochan()

--- a/sys/src/9/port/devcons.c
+++ b/sys/src/9/port/devcons.c
@@ -795,7 +795,7 @@
 		if(buf[0]<'0' || '9'<buf[0])
 			error(Ebadarg);
 		fd = strtoul(buf, 0, 0);
-		swc = fdtochan(fd, -1, 1, 1);
+		swc = fdtochan(fd, ORDWR, 1, 1);
 		setswapchan(swc);
 		break;
 
--