Kernel - Slight reworks to timer code
[tpg/acess2.git] / Kernel / vfs / main.c
index 1000df0..5ff0e7c 100644 (file)
@@ -4,9 +4,10 @@
  */
 #include <acess.h>
 #include <fs_sysfs.h>
-#include "vfs.h"
-#include "vfs_int.h"
-#include "vfs_ext.h"
+#include <threads.h>
+#include <vfs.h>
+#include <vfs_int.h>
+#include <vfs_ext.h>
 
 // === IMPORTS ===
 extern tVFS_Driver     gRootFS_Info;
@@ -52,14 +53,15 @@ int VFS_Init(void)
        giVFS_DriverFileID = SysFS_RegisterFile("VFS/Drivers", NULL, 0);
        
        if( VFS_Mount("root", "/", "rootfs", "") != 0 ) {
-               Panic("Unable to mount root (Where the **** is rootfs?)");
+               Log_KernelPanic("VFS", "Unable to mount root (Where the **** is rootfs?)");
                return -1;
        }
        VFS_MkDir("/Devices");
        VFS_MkDir("/Mount");
        VFS_Mount("dev", "/Devices", "devfs", "");
-       
-       CFGINT(CFG_VFS_MAXFILES) = 32;
+               
+       Log_Debug("VFS", "Setting max files");
+       *Threads_GetMaxFD() = 32;
        return 0;
 }
 
@@ -80,7 +82,7 @@ char *VFS_GetTruePath(const char *Path)
        //Log(" VFS_GetTruePath: node=%p, ret='%s'", node, ret);
        
        if(!node)       return NULL;
-       if(node->Close) node->Close(node);
+       if(node->Type->Close)   node->Type->Close(node);
        
        return ret;
 }

UCC git Repository :: git.ucc.asn.au