kern: improve procfdprint and procfds in devproc

This commit is contained in:
Giacomo Tesio 2017-10-25 01:35:34 +02:00
parent c17d5bdb18
commit 2836ae4d66
1 changed files with 4 additions and 4 deletions

View File

@ -588,7 +588,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, "s r w rw");
return _procfdprint(c, fd, w, s, ns, " s r wrw");
}
static int
@ -635,12 +635,12 @@ procfds(Proc *p, char *va, int count, long offset)
c = f->fd[i];
if(c == nil)
continue;
modestr = "s r w rw";
modestr = " s r wrw";
if(p->blockingfd == i){
if(p->scallnr == SysPread)
modestr = "s R w Rw";
modestr = " s R wRw";
else
modestr = "s r W rW";
modestr = " s r WrW";
}
n += _procfdprint(c, i, w, a+n, count-n, modestr);
offset = procoffset(offset, a, &n);