mirror of https://github.com/PCSX2/pcsx2.git
cdvdgigaherz:linux: Check ioctl return value
Fixes Coverity CID 172718: Unchecked return value Also avoid adding the sector leadout descriptor info to the TOC since it actually isn't used.
This commit is contained in:
parent
c5d727da39
commit
f513ca2a28
|
@ -192,9 +192,8 @@ bool IOCtlSrc::ReadCDInfo()
|
|||
|
||||
// TODO: Do I need a fallback if this doesn't work?
|
||||
entry.cdte_track = 0xAA;
|
||||
ioctl(m_device, CDROMREADTOCENTRY, &entry);
|
||||
m_toc.push_back({static_cast<u32>(entry.cdte_addr.lba), entry.cdte_track,
|
||||
entry.cdte_adr, entry.cdte_ctrl});
|
||||
if (ioctl(m_device, CDROMREADTOCENTRY, &entry) == -1)
|
||||
return false;
|
||||
|
||||
m_sectors = entry.cdte_addr.lba;
|
||||
m_media_type = -1;
|
||||
|
|
Loading…
Reference in New Issue