LOG("No read method");
LEAVE_RET('i', -1);
}
+
+ if( !MM_GetPhysAddr(h->Node->Type->Read) ) {
+ Log_Error("VFS", "Node type %p(%s) read method is junk %p", h->Node->Type, h->Node, h->Node->Type->TypeName,
+ h->Node->Type->Read);
+ LEAVE_RET('i', -1);
+ }
ret = h->Node->Type->Read(h->Node, h->Position, Length, Buffer);
if(ret == -1) LEAVE_RET('i', -1);
Warning("VFS_ReadAt - Node %p, does not have a read method", h->Node);
return 0;
}
+
+ if( !MM_GetPhysAddr(h->Node->Type->Read) ) {
+ Log_Error("VFS", "Node type %p(%s) read method is junk %p", h->Node->Type, h->Node, h->Node->Type->TypeName,
+ h->Node->Type->Read);
+ LEAVE_RET('i', -1);
+ }
+
ret = h->Node->Type->Read(h->Node, Offset, Length, Buffer);
if(ret == -1) return -1;
return ret;
if( h->Node->Flags & VFS_FFLAG_DIRECTORY ) return -1;
if( !h->Node->Type || !h->Node->Type->Write ) return 0;
+
+ if( !MM_GetPhysAddr(h->Node->Type->Write) ) {
+ Log_Error("VFS", "Node type %p(%s) write method is junk %p", h->Node->Type, h->Node, h->Node->Type->TypeName,
+ h->Node->Type->Write);
+ return -1;
+ }
ret = h->Node->Type->Write(h->Node, h->Position, Length, Buffer);
if(ret == -1) return -1;
if( h->Node->Flags & VFS_FFLAG_DIRECTORY ) return -1;
if(!h->Node->Type || !h->Node->Type->Write) return 0;
- ret = h->Node->Type->Write(h->Node, Offset, Length, Buffer);
+ if( !MM_GetPhysAddr(h->Node->Type->Write) ) {
+ Log_Error("VFS", "Node type %p(%s) write method is junk %p", h->Node->Type, h->Node, h->Node->Type->TypeName,
+ h->Node->Type->Write);
+ return -1;
+ }
+ ret = h->Node->Type->Write(h->Node, Offset, Length, Buffer);
if(ret == -1) return -1;
return ret;
}