Bugfixing the x86_64 port
[tpg/acess2.git] / Kernel / vfs / main.c
index 45e20d9..b447f04 100644 (file)
@@ -13,12 +13,12 @@ extern tVFS_Driver  gRootFS_Info;
 extern tVFS_Driver     gDevFS_Info;
 
 // === PROTOTYPES ===
- int   VFS_Init();
+ int   VFS_Init(void);
 char   *VFS_GetTruePath(char *Path);
 void   VFS_GetMemPath(char *Dest, void *Base, Uint Length);
 tVFS_Driver    *VFS_GetFSByName(char *Name);
  int   VFS_AddDriver(tVFS_Driver *Info);
-void   VFS_UpdateDriverFile();
+void   VFS_UpdateDriverFile(void);
 
 // === EXPORTS ===
 EXPORT(VFS_AddDriver);
@@ -35,10 +35,10 @@ char        *gsVFS_MountFile = NULL;
 
 // === CODE ===
 /**
- * \fn int VFS_Init()
+ * \fn int VFS_Init(void)
  * \brief Initialises the VFS for use by the kernel and user
  */
-int VFS_Init()
+int VFS_Init(void)
 {
        // Core Drivers
        gVFS_Drivers = &gRootFS_Info;
@@ -49,7 +49,10 @@ int VFS_Init()
        giVFS_MountFileID = SysFS_RegisterFile("VFS/Mounts", NULL, 0);
        giVFS_DriverFileID = SysFS_RegisterFile("VFS/Drivers", NULL, 0);
        
-       VFS_Mount("root", "/", "rootfs", "");
+       if( VFS_Mount("root", "/", "rootfs", "") != 0 ) {
+               Panic("Unable to mount root (Where the **** is rootfs?)");
+               return -1;
+       }
        VFS_MkDir("/Devices");
        VFS_MkDir("/Mount");
        VFS_Mount("dev", "/Devices", "devfs", "");
@@ -101,6 +104,7 @@ tVFS_Driver *VFS_GetFSByName(char *Name)
        
        for(;drv;drv=drv->Next)
        {
+               Log("strcmp('%s' (%p), '%s') == 0?", drv->Name, drv->Name, Name);
                if(strcmp(drv->Name, Name) == 0)
                        return drv;
        }
@@ -125,10 +129,10 @@ int VFS_AddDriver(tVFS_Driver *Info)
 }
 
 /**
- * \fn void VFS_UpdateDriverFile()
+ * \fn void VFS_UpdateDriverFile(void)
  * \brief Updates the driver list file
  */
-void VFS_UpdateDriverFile()
+void VFS_UpdateDriverFile(void)
 {
        tVFS_Driver     *drv;
         int    len = 0;

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