page: fix noseek detection for files like /dev/screen
This commit is contained in:
parent
25f4840c7e
commit
9b6ecc6114
1 changed files with 1 additions and 1 deletions
|
@ -696,7 +696,7 @@ popenfile(Page *p)
|
||||||
p->open = tab[i].open;
|
p->open = tab[i].open;
|
||||||
if(seek(fd, 0, 0) < 0)
|
if(seek(fd, 0, 0) < 0)
|
||||||
goto Noseek;
|
goto Noseek;
|
||||||
if((i = read(fd, buf+n, n)) < 0)
|
if((i = readn(fd, buf+n, n)) < 0)
|
||||||
goto Err1;
|
goto Err1;
|
||||||
if(i != n || memcmp(buf, buf+n, i)){
|
if(i != n || memcmp(buf, buf+n, i)){
|
||||||
n += i;
|
n += i;
|
||||||
|
|
Loading…
Reference in a new issue