X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffilesys%2Ffile.c;h=d5fc10de15004e98d4f8490aa8a7ec8a4c7efcff;hb=bb0485f5561709b2d9a97fdeda9bfa1bd55a20c9;hp=029d8ce847a26d7b02f4606bd48f750a4476f3bd;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/filesys/file.c b/src/filesys/file.c index 029d8ce..d5fc10d 100644 --- a/src/filesys/file.c +++ b/src/filesys/file.c @@ -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,