Usermode/libposix - Misc
[tpg/acess2.git] / KernelLand / Modules / Input / Mouse / main.c
index 5e6a9a2..25185a2 100644 (file)
@@ -15,9 +15,9 @@
 
 // === PROTOTYPES ===
  int   Mouse_Install(char **Arguments);
-void   Mouse_Cleanup(void);
+ int   Mouse_Cleanup(void);
 // - "User" side
-char   *Mouse_Root_ReadDir(tVFS_Node *Node, int Pos);
+ int   Mouse_Root_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]);
 tVFS_Node      *Mouse_Root_FindDir(tVFS_Node *Node, const char *Name);
  int   Mouse_Dev_IOCtl(tVFS_Node *Node, int ID, void *Data);
 size_t Mouse_Dev_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Data);
@@ -62,15 +62,18 @@ int Mouse_Install(char **Arguments)
 /**
  * \brief Pre-unload cleanup function
  */
-void Mouse_Cleanup(void)
+int Mouse_Cleanup(void)
 {
+       return 0;
 }
 
 // --- VFS Interface ---
-char *Mouse_Root_ReadDir(tVFS_Node *Node, int Pos)
+int Mouse_Root_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX])
 {
-       if( Pos != 0 )  return NULL;
-       return strdup("system");
+       if( Pos != 0 )
+               return -EINVAL;
+       strcpy(Dest, "system");
+       return 0;
 }
 
 tVFS_Node *Mouse_Root_FindDir(tVFS_Node *Node, const char *Name)

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