diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -22,19 +22,7 @@ fileinit(void) initlock(&fd_table_lock, "fd_table"); } -// Allocate a file descriptor number for curproc. -int -fdalloc(void) -{ - int fd; - struct proc *p = curproc[cpu()]; - for(fd = 0; fd < NOFILE; fd++) - if(p->ofile[fd] == 0) - return fd; - return -1; -} - -// Allocate a file descriptor structure +// Allocate a file structure struct file* filealloc(void) { |