~kris/9p

9hist

5a961254452c977be271ee78076a3f73cd33b5f8 — David du Colombier 24 years ago e057ad7
Plan 9 from Bell Labs 2002-06-22
2 files changed, 4 insertions(+), 1 deletions(-)

M pc/devtv.c
M port/devcap.c
M pc/devtv.c => pc/devtv.c +2 -1
@@ 782,7 782,8 @@ tvstat(Chan *c, uchar *db, int n)
static Chan*
tvopen(Chan *c, int omode)
{
	if (omode != OREAD && TYPE(c->qid) != Qctl)
	if (omode != OREAD && 
		TYPE(c->qid) != Qctl && TYPE(c->qid) != Qvdata)
		error(Eperm);

	switch (TYPE(c->qid)) {

M port/devcap.c => port/devcap.c +2 -0
@@ 89,6 89,8 @@ capopen(Chan *c, int omode)
	qlock(&capalloc);
	switch((ulong)c->qid.path){
	case Qhash:
		if(!iseve())
			error(Eperm);
		if(capalloc.opens > 0){
			qunlock(&capalloc);
			error("exclusive use");