Kernel/x86 - Reference issues
[tpg/acess2.git] / KernelLand / Modules / Input / Mouse / main.c
index 5e6a9a2..8c27f13 100644 (file)
 
 // === 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);
-tVFS_Node      *Mouse_Root_FindDir(tVFS_Node *Node, const char *Name);
+ int   Mouse_Root_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]);
+tVFS_Node      *Mouse_Root_FindDir(tVFS_Node *Node, const char *Name, Uint Flags);
  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);
+size_t Mouse_Dev_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Data, Uint Flags);
 // - Device Side
 tMouse *Mouse_Register(const char *Name, int NumButtons, int NumAxies);
 void   Mouse_RemoveInstance(tMouse *Handle);
@@ -62,18 +62,21 @@ 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)
+tVFS_Node *Mouse_Root_FindDir(tVFS_Node *Node, const char *Name, Uint Flags)
 {
        if( strcmp(Name, "system") != 0 )       return NULL;
        return &gMouse_Pointer.Node;
@@ -116,7 +119,7 @@ int Mouse_Dev_IOCtl(tVFS_Node *Node, int ID, void *Data)
 /**
  * \brief Read from a device
  */
-size_t Mouse_Dev_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Data)
+size_t Mouse_Dev_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Data, Uint Flags)
 {
        tPointer *ptr = Node->ImplPtr;
         int    n_buttons = ptr->FileHeader->NButtons;

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