| plan 9 kernel history: overview | file list | diff list |
1990/0321/port/devcons.c (diff list | history)
| 1990/0312/sys/src/9/port/devcons.c:180,196 – 1990/0321/sys/src/9/port/devcons.c:180,197 (short | long | prev | next) | ||
| 1990/0227 | c = u->fd[2]; if(c==0 || (c->mode!=OWRITE && c->mode!=ORDWR)) | |
| 1990/0321 | return 0; | |
| 1990/0227 | n = sprint(buf, "%s %d: ", u->p->text, u->p->pid); n = donprint(buf+n, buf+sizeof(buf), fmt, (&fmt+1)) - buf; qlock(c); if(waserror()){ qunlock(c); | |
| 1990/0321 | return 0; | |
| 1990/0227 | } (*devtab[c->type].write)(c, buf, n); c->offset += n; qunlock(c); | |
| 1990/0321 | poperror(); | |
| 1990/0227 | return n; } | |