}
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);
}
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);
Uint flags = 0;
flags |= (h->Mode & VFS_OPENFLAG_NONBLOCK) ? VFS_IOFLAG_NOBLOCK : 0;
ret = h->Node->Type->Read(h->Node, h->Position, Length, Buffer, flags);
Uint flags = 0;
flags |= (h->Mode & VFS_OPENFLAG_NONBLOCK) ? VFS_IOFLAG_NOBLOCK : 0;
ret = h->Node->Type->Read(h->Node, h->Position, Length, Buffer, flags);
- if(ret == (size_t)-1) LEAVE_RET('i', -1);
+ if(ret != Length) LOG("%i/%i read", ret, Length);
+ if(ret == (size_t)-1) return -1;
Log_Error("VFS", "Node type %p(%s) read method is junk %p",
h->Node->Type, h->Node->Type->TypeName,
h->Node->Type->Read);
Log_Error("VFS", "Node type %p(%s) read method is junk %p",
h->Node->Type, h->Node->Type->TypeName,
h->Node->Type->Read);
}
Uint flags = 0;
flags |= (h->Mode & VFS_OPENFLAG_NONBLOCK) ? VFS_IOFLAG_NOBLOCK : 0;
ret = h->Node->Type->Read(h->Node, Offset, Length, Buffer, flags);
}
Uint flags = 0;
flags |= (h->Mode & VFS_OPENFLAG_NONBLOCK) ? VFS_IOFLAG_NOBLOCK : 0;
ret = h->Node->Type->Read(h->Node, Offset, Length, Buffer, flags);
if( !(h->Mode & VFS_OPENFLAG_WRITE) ) {
LOG("FD%i not opened for writing", FD);
if( !(h->Mode & VFS_OPENFLAG_WRITE) ) {
LOG("FD%i not opened for writing", FD);
return -1;
}
if( !h->Node->Type || !h->Node->Type->Write ) {
LOG("FD%i has no write method", FD);
return -1;
}
if( !h->Node->Type || !h->Node->Type->Write ) {
LOG("FD%i has no write method", FD);
Log_Error("VFS", "Node type %p(%s) write method is junk %p",
h->Node->Type, h->Node->Type->TypeName,
h->Node->Type->Write);
Log_Error("VFS", "Node type %p(%s) write method is junk %p",
h->Node->Type, h->Node->Type->TypeName,
h->Node->Type->Write);
return -1;
}
Uint flags = 0;
flags |= (h->Mode & VFS_OPENFLAG_NONBLOCK) ? VFS_IOFLAG_NOBLOCK : 0;
ret = h->Node->Type->Write(h->Node, h->Position, Length, Buffer, flags);
return -1;
}
Uint flags = 0;
flags |= (h->Mode & VFS_OPENFLAG_NONBLOCK) ? VFS_IOFLAG_NOBLOCK : 0;
ret = h->Node->Type->Write(h->Node, h->Position, Length, Buffer, flags);