#endif
int SysFS_Comm_ReadDir(tVFS_Node *Node, int Id, char Dest[FILENAME_MAX]);
-tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, const char *Filename);
-size_t SysFS_Comm_ReadFile(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer);
+tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, const char *Filename, Uint Flags);
+size_t SysFS_Comm_ReadFile(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer, Uint Flags);
void SysFS_Comm_CloseFile(tVFS_Node *Node);
// === GLOBALS ===
if( !child )
{
child = calloc( 1, sizeof(tSysFS_Ent)+tmp+1 );
+ if( !child ) {
+ Log_Error("SysFS", "calloc(%i) failure", sizeof(tSysFS_Ent)+tmp+1);
+ return -1;
+ }
child->Next = NULL;
memcpy(child->Name, &Path[start], tmp);
child->Name[tmp] = '\0';
ent->Node.Size ++;
else
gSysFS_DriverInfo.RootNode.Size ++;
- Log_Log("SysFS", "Added directory '%s'", child->Name);
+ Log_Log("SysFS", "Added directory '%.*s'", tmp, &Path[start]);
+ Log_Log("SysFS", "Added directory '%.*s'", tmp, child->Name);
}
ent = child;
* \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, const char *Filename)
+tVFS_Node *SysFS_Comm_FindDir(tVFS_Node *Node, const char *Filename, Uint Flags)
{
tSysFS_Ent *child = (tSysFS_Ent*)Node->ImplPtr;
/**
* \brief Read from an exposed buffer
*/
-size_t SysFS_Comm_ReadFile(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer)
+size_t SysFS_Comm_ReadFile(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer, Uint Flags)
{
if( Offset > Node->Size ) return -1;
if( Length > Node->Size ) Length = Node->Size;