shithub: riscv

Download patch

ref: 9b6ecc6114ce0d526f55e25efbc147348f30c178
parent: 25f4840c7eb70b7af3da3e9c13fcff704fab9d11
author: cinap_lenrek <cinap_lenrek@vmi>
date: Tue Nov 29 08:42:15 EST 2011

page: fix noseek detection for files like /dev/screen

--- a/sys/src/cmd/page.c
+++ b/sys/src/cmd/page.c
@@ -696,7 +696,7 @@
 	p->open = tab[i].open;
 	if(seek(fd, 0, 0) < 0)
 		goto Noseek;
-	if((i = read(fd, buf+n, n)) < 0)
+	if((i = readn(fd, buf+n, n)) < 0)
 		goto Err1;
 	if(i != n || memcmp(buf, buf+n, i)){
 		n += i;