|
|
1.1 ! root 1: /* access.c - access */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <file.h> ! 6: #include <name.h> ! 7: ! 8: /*------------------------------------------------------------------------ ! 9: * access - determine accessability given file name and desired mode ! 10: *------------------------------------------------------------------------ ! 11: */ ! 12: access(name, mode) ! 13: char *name; ! 14: int mode; ! 15: { ! 16: char fullnam[NAMLEN]; ! 17: struct devsw *devptr; ! 18: int dev; ! 19: ! 20: if ( (dev=nammap(name, fullnam)) == SYSERR) ! 21: return(SYSERR); ! 22: devptr = &devtab[dev]; ! 23: return( (*devptr->dvcntl)(devptr, FLACCESS, fullnam, mode) ); ! 24: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.