From 1ccff18b2404e18fc889901f85b72777193c0b3f Mon Sep 17 00:00:00 2001 From: rsc Date: Mon, 27 Aug 2007 14:35:09 +0000 Subject: fileincref -> filedup (consistent with idup) --- file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 297fd1c..9bd6ece 100644 --- a/file.c +++ b/file.c @@ -41,14 +41,15 @@ filealloc(void) } // Increment ref count for file f. -void -fileincref(struct file *f) +struct file* +filedup(struct file *f) { acquire(&file_table_lock); if(f->ref < 1 || f->type == FD_CLOSED) - panic("fileincref"); + panic("filedup"); f->ref++; release(&file_table_lock); + return f; } // Read from file f. Addr is kernel address. -- cgit v1.2.3