VFS - Rework to remove function pointers from tVFS_Node
[tpg/acess2.git] / Modules / Display / VESA / main.c
index 55083b0..a85d313 100644 (file)
@@ -24,7 +24,7 @@
 // === PROTOTYPES ===\r
  int   Vesa_Install(char **Arguments);\r
 Uint64 Vesa_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer);\r
-Uint64 Vesa_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer);\r
+Uint64 Vesa_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer);\r
  int   Vesa_IOCtl(tVFS_Node *Node, int ID, void *Data);\r
  int   Vesa_Int_SetMode(int Mode);\r
  int   Vesa_Int_FindMode(tVideo_IOCtl_Mode *data);\r
@@ -35,14 +35,15 @@ void        Vesa_FlipCursor(void *Arg);
 \r
 // === GLOBALS ===\r
 MODULE_DEFINE(0, VERSION, Vesa, Vesa_Install, NULL, "PCI", "VM8086", NULL);\r
-tDevFS_Driver  gVesa_DriverStruct = {\r
-       NULL, "Vesa",\r
-       {\r
+tVFS_NodeType  gVesa_NodeType = {\r
        .Read = Vesa_Read,\r
        .Write = Vesa_Write,\r
        .IOCtl = Vesa_IOCtl\r
-       }\r
-};\r
+       };\r
+tDevFS_Driver  gVesa_DriverStruct = {\r
+       NULL, "Vesa",\r
+       {.Type = &gVesa_NodeType}\r
+       };\r
 tMutex glVesa_Lock;\r
 tVM8086        *gpVesa_BiosState;\r
  int   giVesaDriverId = -1;\r
@@ -178,7 +179,7 @@ Uint64 Vesa_Read(tVFS_Node *Node, Uint64 off, Uint64 len, void *buffer)
 /**\r
  * \brief Write to the framebuffer\r
  */\r
-Uint64 Vesa_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)\r
+Uint64 Vesa_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer)\r
 {\r
        if( gVesa_Modes[giVesaCurrentMode].framebuffer == 0 ) {\r
                Log_Warning("VESA", "Vesa_Write - Non-LFB Modes not yet supported.");\r

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