// Internal\r
// Filesystem\r
Uint64 PL110_Read(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer);\r
-Uint64 PL110_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer);\r
+Uint64 PL110_Write(tVFS_Node *node, Uint64 off, Uint64 len, const void *buffer);\r
int PL110_IOCtl(tVFS_Node *node, int id, void *data);\r
// -- Internals\r
int PL110_int_SetResolution(int W, int H);\r
\r
// === GLOBALS ===\r
MODULE_DEFINE(0, VERSION, PL110, PL110_Install, NULL, NULL);\r
-tDevFS_Driver gPL110_DriverStruct = {\r
- NULL, "PL110",\r
- {\r
+tVFS_NodeType gPL110_DevNodeType = {\r
.Read = PL110_Read,\r
.Write = PL110_Write,\r
.IOCtl = PL110_IOCtl\r
- }\r
+ };\r
+tDevFS_Driver gPL110_DriverStruct = {\r
+ NULL, "PL110",\r
+ {.Type = &gPL110_DevNodeType}\r
};\r
// -- Options\r
tPAddr gPL110_PhysBase = PL110_BASE;\r
/**\r
* \brief Write to the framebuffer\r
*/\r
-Uint64 PL110_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)\r
+Uint64 PL110_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer)\r
{\r
gPL110_DrvUtil_BufInfo.BufferFormat = giPL110_BufferMode;\r
return DrvUtil_Video_WriteLFB(&gPL110_DrvUtil_BufInfo, Offset, Length, Buffer);\r
.Size = $size,
.Inode = {$inode},
.ImplPtr = {$prefix}_{$i}_entries,
- .ReadDir = InitRD_ReadDir,
- .FindDir = InitRD_FindDir
+ .Type = &gInitRD_DirType
};
EOF;
.Size = $size,
.Inode = {$inode},
.ImplPtr = $_sym,
- .Read = InitRD_ReadFile
+ .Type = &gInitRD_FileType
};
EOF;
.Flags = VFS_FFLAG_DIRECTORY,
.Size = $nRootFiles,
.ImplPtr = gInitRD_Root_Files,
- .ReadDir = InitRD_ReadDir,
- .FindDir = InitRD_FindDir
+ .Type = &gInitRD_DirType
};
EOF;
tVFS_Driver gInitRD_FSInfo = {
"initrd", 0, InitRD_InitDevice, InitRD_Unmount, InitRD_GetNodeFromINode
};
+tVFS_NodeType gInitRD_DirType = {
+ .ReadDir = InitRD_ReadFile,
+ .FindDir = InitRD_FindDir
+ };
+tVFS_NodeType gInitRD_FileType = {
+ .Read = InitRD_ReadFile
+ };
/**
* \brief Register initrd with the kernel