X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Kernel%2Fdrv%2Fproc.c;h=c0ce6edc521f825d601b4836672e6bc6d382ef33;hb=48de21e1b27fcb2595aabe2669bdec80567961df;hp=521bb055a70b5887edaf453c34c8b867eeac058b;hpb=e939fc0ced4d445c24696636fe660dddbe035b1c;p=tpg%2Facess2.git diff --git a/Kernel/drv/proc.c b/Kernel/drv/proc.c index 521bb055..c0ce6edc 100644 --- a/Kernel/drv/proc.c +++ b/Kernel/drv/proc.c @@ -26,12 +26,14 @@ typedef struct sSysFS_Ent int SysFS_Install(char **Arguments); int SysFS_IOCtl(tVFS_Node *Node, int Id, void *Data); - int SysFS_RegisterFile(char *Path, char *Data, int Length); - int SysFS_UpdateFile(int ID, char *Data, int Length); +#if 0 + int SysFS_RegisterFile(const char *Path, const char *Data, int Length); + int SysFS_UpdateFile(int ID, const char *Data, int Length); int SysFS_RemoveFile(int ID); +#endif char *SysFS_Comm_ReadDir(tVFS_Node *Node, int Id); -tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, char *Filename); +tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, const char *Filename); Uint64 SysFS_Comm_ReadFile(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); void SysFS_Comm_CloseFile(tVFS_Node *Node); @@ -44,7 +46,7 @@ tSysFS_Ent gSysFS_Version_Kernel = { &gSysFS_Version, // Parent { .Inode = 1, // File #1 - .ImplPtr = KERNEL_VERSION_STRING, + .ImplPtr = (void*)KERNEL_VERSION_STRING, .ImplInt = (Uint)&gSysFS_Version_Kernel, // Self-Link .Size = sizeof(KERNEL_VERSION_STRING)-1, .NumACLs = 1, @@ -114,7 +116,7 @@ int SysFS_Install(char **Options) * \param Length Length of the data buffer * \return The file's identifier */ -int SysFS_RegisterFile(char *Path, char *Data, int Length) +int SysFS_RegisterFile(const char *Path, const char *Data, int Length) { int start = 0; int tmp; @@ -199,7 +201,7 @@ int SysFS_RegisterFile(char *Path, char *Data, int Length) child->Parent = ent; child->Node.Inode = giSysFS_NextFileID++; - child->Node.ImplPtr = Data; + child->Node.ImplPtr = (void*)Data; child->Node.ImplInt = (Uint)child; // Uplink child->Node.Size = Length; child->Node.NumACLs = 1; @@ -235,7 +237,7 @@ int SysFS_RegisterFile(char *Path, char *Data, int Length) * \param Length Length of the data buffer * \return Boolean Success */ -int SysFS_UpdateFile(int ID, char *Data, int Length) +int SysFS_UpdateFile(int ID, const char *Data, int Length) { tSysFS_Ent *ent; @@ -245,7 +247,7 @@ int SysFS_UpdateFile(int ID, char *Data, int Length) if(ent->Node.Inode < ID) return 0; if(ent->Node.Inode == ID) { - ent->Node.ImplPtr = Data; + ent->Node.ImplPtr = (void*)Data; ent->Node.Size = Length; return 1; } @@ -322,10 +324,10 @@ char *SysFS_Comm_ReadDir(tVFS_Node *Node, int Pos) } /** - * \fn tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, char *Filename) + * \fn tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, const char *Filename) * \brief Find a file in a SysFS directory */ -tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, char *Filename) +tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, const char *Filename) { tSysFS_Ent *child = (tSysFS_Ent*)Node->ImplPtr;