Bugfixing initrd and ld-acess
[tpg/acess2.git] / Kernel / vfs / main.c
index 795a64f..736b578 100644 (file)
@@ -2,7 +2,7 @@
  * Acess 2
  * Virtual File System
  */
-#include <common.h>
+#include <acess.h>
 #include <fs_sysfs.h>
 #include "vfs.h"
 #include "vfs_int.h"
@@ -15,11 +15,14 @@ extern tVFS_Driver  gDevFS_Info;
 // === PROTOTYPES ===
  int   VFS_Init();
 char   *VFS_GetTruePath(char *Path);
-void   VFS_GetMemPath(void *Base, Uint Length, char *Dest);
+void   VFS_GetMemPath(char *Dest, void *Base, Uint Length);
 tVFS_Driver    *VFS_GetFSByName(char *Name);
  int   VFS_AddDriver(tVFS_Driver *Info);
 void   VFS_UpdateDriverFile();
 
+// === EXPORTS ===
+EXPORT(VFS_AddDriver);
+
 // === GLOBALS ===
 tVFS_Node      NULLNode = {0};
 tSpinlock      siDriverListLock = 0;
@@ -76,16 +79,17 @@ char *VFS_GetTruePath(char *Path)
 }
 
 /**
- * \fn void VFS_GetMemPath(void *Base, Uint Length, char *Dest)
+ * \fn void VFS_GetMemPath(char *Dest, void *Base, Uint Length)
  * \brief Create a VFS memory pointer path
  */
-void VFS_GetMemPath(void *Base, Uint Length, char *Dest)
+void VFS_GetMemPath(char *Dest, void *Base, Uint Length)
 {
        Log("VFS_GetMemPath: (Base=%p, Length=0x%x, Dest=%p)", Base, Length, Dest);
        Dest[0] = '$';
        itoa( &Dest[1], (Uint)Base, 16, BITS/4, '0' );
        Dest[BITS/4+1] = ':';
        itoa( &Dest[BITS/4+2], Length, 16, BITS/4, '0' );
+       Dest[BITS/2+2] = '\0';
        
        Log("VFS_GetMemPath: Dest = \"%s\"", Dest);
 }

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