kernel: fix fd mode print in devproc
This commit is contained in:
parent
e93aafc028
commit
d1cc947cd9
@ -571,7 +571,7 @@ _procfdprint(Chan *c, int fd, int w, char *s, int ns, char * modestr)
|
|||||||
int
|
int
|
||||||
procfdprint(Chan *c, int fd, int w, char *s, int ns)
|
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
|
static int
|
||||||
@ -618,12 +618,12 @@ procfds(Proc *p, char *va, int count, long offset)
|
|||||||
c = f->fd[i];
|
c = f->fd[i];
|
||||||
if(c == nil)
|
if(c == nil)
|
||||||
continue;
|
continue;
|
||||||
modestr = "r w rw";
|
modestr = "s r w rw";
|
||||||
if(p->blockingfd == i){
|
if(p->blockingfd == i){
|
||||||
if(p->scallnr == SysPread)
|
if(p->scallnr == SysPread)
|
||||||
modestr = "R w Rw";
|
modestr = "s R w Rw";
|
||||||
else
|
else
|
||||||
modestr = "r W rW";
|
modestr = "s r W rW";
|
||||||
}
|
}
|
||||||
n += _procfdprint(c, i, w, a+n, count-n, modestr);
|
n += _procfdprint(c, i, w, a+n, count-n, modestr);
|
||||||
offset = procoffset(offset, a, &n);
|
offset = procoffset(offset, a, &n);
|
||||||
|
Loading…
Reference in New Issue
Block a user