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?
|
// TODO: Do I need a fallback if this doesn't work?
|
||||||
entry.cdte_track = 0xAA;
|
entry.cdte_track = 0xAA;
|
||||||
ioctl(m_device, CDROMREADTOCENTRY, &entry);
|
if (ioctl(m_device, CDROMREADTOCENTRY, &entry) == -1)
|
||||||
m_toc.push_back({static_cast<u32>(entry.cdte_addr.lba), entry.cdte_track,
|
return false;
|
||||||
entry.cdte_adr, entry.cdte_ctrl});
|
|
||||||
|
|
||||||
m_sectors = entry.cdte_addr.lba;
|
m_sectors = entry.cdte_addr.lba;
|
||||||
m_media_type = -1;
|
m_media_type = -1;
|
||||||
|
|
Loading…
Reference in New Issue