* Acess 2
* Virtual File System
*/
-#include <common.h>
+#include <acess.h>
#include <fs_sysfs.h>
#include "vfs.h"
#include "vfs_int.h"
extern tVFS_Driver gDevFS_Info;
// === PROTOTYPES ===
- int VFS_Init();
+ int VFS_Init(void);
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();
+void VFS_UpdateDriverFile(void);
+
+// === EXPORTS ===
+EXPORT(VFS_AddDriver);
// === GLOBALS ===
tVFS_Node NULLNode = {0};
// === 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;
}
/**
- * \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' );
-
- Log("VFS_GetMemPath: Dest = \"%s\"", Dest);
+ Dest[BITS/2+2] = '\0';
}
/**
}
/**
- * \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;