summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
refactor syscall code
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/file.c b/file.c
index 29f07cc..4c314ec 100644
--- a/file.c
+++ b/file.c
@@ -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)
{