Add file_get_inode() for symmetry with dir_get_inode().
[pintos-anon] / src / filesys / file.c
index 029d8ce847a26d7b02f4606bd48f750a4476f3bd..d5fc10de15004e98d4f8490aa8a7ec8a4c7efcff 100644 (file)
@@ -53,6 +53,13 @@ file_close (struct file *file)
     }
 }
 
+/* Returns the inode encapsulated by FILE. */
+struct inode *
+file_get_inode (struct file *file) 
+{
+  return file->inode;
+}
+
 /* Reads SIZE bytes from FILE into BUFFER,
    starting at the file's current position.
    Returns the number of bytes actually read,