// === PROTOTYPES ===\r
int FAT_Install(char **Arguments);\r
tVFS_Node *FAT_InitDevice(char *device, char *options);\r
-void FAT_CloseDevice(tVFS_Node *node);\r
+void FAT_Unmount(tVFS_Node *Node);\r
Uint64 FAT_Read(tVFS_Node *node, Uint64 offset, Uint64 length, void *buffer);\r
Uint64 FAT_Write(tVFS_Node *node, Uint64 offset, Uint64 length, void *buffer);\r
char *FAT_ReadDir(tVFS_Node *dirNode, int dirpos);\r
t_lfncache *fat_lfncache;\r
#endif\r
tVFS_Driver gFAT_FSInfo = {\r
- "fat", 0, FAT_InitDevice, NULL\r
+ "fat", 0, FAT_InitDevice, FAT_Unmount, NULL\r
};\r
\r
// === CODE ===\r
node->FindDir = FAT_FindDir;\r
node->Relink = FAT_Relink;\r
node->MkNod = FAT_Mknod;\r
- node->Close = FAT_CloseDevice;\r
+ //node->Close = FAT_CloseDevice;\r
\r
giFAT_PartCount ++;\r
return node;\r
}\r
\r
/**\r
- * \fn void FAT_CloseDevice(tVFS_Node *node)\r
+ * \fn void FAT_Unmount(tVFS_Node *Node)\r
* \brief Closes a mount and marks it as free\r
*/\r
-void FAT_CloseDevice(tVFS_Node *node)\r
+void FAT_Unmount(tVFS_Node *Node)\r
{\r
- node->ReferenceCount --;\r
- \r
- if(node->ReferenceCount > 0) return;\r
- \r
// Close Disk Handle\r
- VFS_Close( gFAT_Disks[node->ImplInt].fileHandle );\r
- Inode_ClearCache(gFAT_Disks[node->ImplInt].inodeHandle);\r
- gFAT_Disks[node->ImplInt].fileHandle = -2;\r
+ VFS_Close( gFAT_Disks[Node->ImplInt].fileHandle );\r
+ // Clear Node Cache\r
+ Inode_ClearCache(gFAT_Disks[Node->ImplInt].inodeHandle);\r
+ // Mark as unused\r
+ gFAT_Disks[Node->ImplInt].fileHandle = -2;\r
return;\r
}\r
\r