kernel: fix fd mode print in devproc

This commit is contained in:
Giacomo Tesio 2017-01-11 03:01:04 +01:00
parent e93aafc028
commit d1cc947cd9
1 changed files with 4 additions and 4 deletions

View File

@ -571,7 +571,7 @@ _procfdprint(Chan *c, int fd, int w, char *s, int ns, char * modestr)
int
procfdprint(Chan *c, int fd, int w, char *s, int ns)
{
return _procfdprint(c, fd, w, s, ns, "r w rw");
return _procfdprint(c, fd, w, s, ns, "s r w rw");
}
static int
@ -618,12 +618,12 @@ procfds(Proc *p, char *va, int count, long offset)
c = f->fd[i];
if(c == nil)
continue;
modestr = "r w rw";
modestr = "s r w rw";
if(p->blockingfd == i){
if(p->scallnr == SysPread)
modestr = "R w Rw";
modestr = "s R w Rw";
else
modestr = "r W rW";
modestr = "s r W rW";
}
n += _procfdprint(c, i, w, a+n, count-n, modestr);
offset = procoffset(offset, a, &n);