devshr/devsrv

This commit is contained in:
cinap_lenrek 2011-08-14 11:11:51 +02:00
parent 5784424390
commit 945e2a7aa1
2 changed files with 557 additions and 450 deletions

File diff suppressed because it is too large Load diff

View file

@ -124,7 +124,7 @@ srvopen(Chan *c, int omode)
error(Eshutdown);
if(omode&OTRUNC)
error("srv file already exists");
error(Eexist);
if(openmode(omode)!=sp->chan->mode && sp->chan->mode!=ORDWR)
error(Eperm);
devpermcheck(sp->owner, sp->perm, omode);
@ -145,9 +145,6 @@ srvcreate(Chan *c, char *name, int omode, ulong perm)
if(openmode(omode) != OWRITE)
error(Eperm);
if(omode & OCEXEC) /* can't happen */
panic("someone broke namec");
sp = smalloc(sizeof *sp);
sname = smalloc(strlen(name)+1);