ok, fix this one a better way, as suggested by Michael and Marcus.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33003 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2009-09-08 20:29:10 +00:00
parent 22d58c7521
commit c8ef813271
1 changed files with 3 additions and 6 deletions

View File

@ -107,15 +107,12 @@ make_msf_address(uint8 minutes, uint8 seconds, uint8 frames)
*/ */
static static
inline inline
uint32 off_t
msf_to_lba(msf_address msf) msf_to_lba(msf_address msf)
{ {
uint32 lba = (CDROM_FRAMES_PER_MINUTE * msf.minutes) return (CDROM_FRAMES_PER_MINUTE * msf.minutes)
+ (CDROM_FRAMES_PER_SECOND * msf.seconds) + (CDROM_FRAMES_PER_SECOND * msf.seconds)
+ msf.frames; + msf.frames - 150;
if (lba < 150)
return lba;
return (lba - 150);
} }
/*! \brief Header for data returned by all formats of SCSI /*! \brief Header for data returned by all formats of SCSI