DualErr FatParser::Read( PGPUInt8 *buf, PGPUInt64 pos, PGPUInt32 nBytes, GenericCallbackInfo *upInfo) { DualErr derr; pgpAssertAddrValid(buf, PGPUInt8); if (upInfo) ReadAsync(buf, pos, nBytes, upInfo); else derr = ReadSync(buf, pos, nBytes); return derr; }
bool InputIsoFile::tryIsoType(u32 _size, s32 _offset, s32 _blockofs) { static u8 buf[2456]; m_blocksize = _size; m_offset = _offset; m_blockofs = _blockofs; m_reader->SetDataOffset(_offset); m_reader->SetBlockSize(_size); if(ReadSync(buf, 16) < 0) return false; if (strncmp((char*)(buf+25), "CD001", 5)) // Not ISO 9660 compliant return false; m_type = (*(u16*)(buf+190) == 2048) ? ISOTYPE_CD : ISOTYPE_DVD; return true; // We can deal with this. }
DualErr PGPdisk::Read( PGPUInt8 *buf, PGPUInt64 pos, PGPUInt32 nBytes, GenericCallbackInfo *upInfo) { DualErr derr; pgpAssertAddrValid(buf, PGPUInt8); pgpAssert(Mounted()); DebugOut("PGPdisk: Reading PGPdisk %u at pos %u nBlocks %u", GetDrive(), (PGPUInt32) (pos/kDefaultBlockSize), (PGPUInt32) (nBytes/kDefaultBlockSize)); if (upInfo) ReadAsync(buf, pos, nBytes, upInfo); else derr = ReadSync(buf, pos, nBytes); return derr; }
void GzippedFileReader::BeginRead(void* pBuffer, uint sector, uint count) { // No a-sync support yet, implement as sync mBytesRead = ReadSync(pBuffer, sector, count); return; };
void BlockdumpFileReader::BeginRead(void* pBuffer, uint sector, uint count) { m_lresult = ReadSync(pBuffer, sector, count); }