From: John Hodge Date: Sat, 21 Jan 2012 03:58:10 +0000 (+0800) Subject: Fixing ARM build from VFS changes X-Git-Tag: rel0.15~792^2~27 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=72e29833e3b233d25919ba8e149a03fbfa6545af;p=tpg%2Facess2.git Fixing ARM build from VFS changes --- diff --git a/Modules/Display/PL110/main.c b/Modules/Display/PL110/main.c index 4d7b938d..c3b6e526 100644 --- a/Modules/Display/PL110/main.c +++ b/Modules/Display/PL110/main.c @@ -65,20 +65,21 @@ void PL110_Uninstall(); // Internal // Filesystem Uint64 PL110_Read(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer); -Uint64 PL110_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer); +Uint64 PL110_Write(tVFS_Node *node, Uint64 off, Uint64 len, const void *buffer); int PL110_IOCtl(tVFS_Node *node, int id, void *data); // -- Internals int PL110_int_SetResolution(int W, int H); // === GLOBALS === MODULE_DEFINE(0, VERSION, PL110, PL110_Install, NULL, NULL); -tDevFS_Driver gPL110_DriverStruct = { - NULL, "PL110", - { +tVFS_NodeType gPL110_DevNodeType = { .Read = PL110_Read, .Write = PL110_Write, .IOCtl = PL110_IOCtl - } + }; +tDevFS_Driver gPL110_DriverStruct = { + NULL, "PL110", + {.Type = &gPL110_DevNodeType} }; // -- Options tPAddr gPL110_PhysBase = PL110_BASE; @@ -139,7 +140,7 @@ Uint64 PL110_Read(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer) /** * \brief Write to the framebuffer */ -Uint64 PL110_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) +Uint64 PL110_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer) { gPL110_DrvUtil_BufInfo.BufferFormat = giPL110_BufferMode; return DrvUtil_Video_WriteLFB(&gPL110_DrvUtil_BufInfo, Offset, Length, Buffer); diff --git a/Modules/Filesystems/InitRD/GenerateInitRD.php b/Modules/Filesystems/InitRD/GenerateInitRD.php index af967d5a..e7cd4f7e 100644 --- a/Modules/Filesystems/InitRD/GenerateInitRD.php +++ b/Modules/Filesystems/InitRD/GenerateInitRD.php @@ -98,8 +98,7 @@ tVFS_Node {$prefix}_{$i} = { .Size = $size, .Inode = {$inode}, .ImplPtr = {$prefix}_{$i}_entries, - .ReadDir = InitRD_ReadDir, - .FindDir = InitRD_FindDir + .Type = &gInitRD_DirType }; EOF; @@ -161,7 +160,7 @@ tVFS_Node {$prefix}_{$i} = { .Size = $size, .Inode = {$inode}, .ImplPtr = $_sym, - .Read = InitRD_ReadFile + .Type = &gInitRD_FileType }; EOF; @@ -189,8 +188,7 @@ tVFS_Node gInitRD_RootNode = { .Flags = VFS_FFLAG_DIRECTORY, .Size = $nRootFiles, .ImplPtr = gInitRD_Root_Files, - .ReadDir = InitRD_ReadDir, - .FindDir = InitRD_FindDir + .Type = &gInitRD_DirType }; EOF; diff --git a/Modules/Filesystems/InitRD/initrd.h b/Modules/Filesystems/InitRD/initrd.h index 8ebabd36..479a8418 100644 --- a/Modules/Filesystems/InitRD/initrd.h +++ b/Modules/Filesystems/InitRD/initrd.h @@ -18,4 +18,8 @@ extern Uint64 InitRD_ReadFile(tVFS_Node *Node, Uint64 Offset, Uint64 Size, void extern char *InitRD_ReadDir(tVFS_Node *Node, int ID); extern tVFS_Node *InitRD_FindDir(tVFS_Node *Node, const char *Name); +// === Globals === +tVFS_NodeType gInitRD_DirType; +tVFS_NodeType gInitRD_FileType; + #endif diff --git a/Modules/Filesystems/InitRD/main.c b/Modules/Filesystems/InitRD/main.c index b2ed2b31..b52ab8de 100644 --- a/Modules/Filesystems/InitRD/main.c +++ b/Modules/Filesystems/InitRD/main.c @@ -27,6 +27,13 @@ MODULE_DEFINE(0, 0x0A, FS_InitRD, InitRD_Install, NULL); 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