Ignore negative start LBA values and assume 0 instead. At least VMWare Fusion

seems to incorrectly set pseconds to 0 for the first track, leading to an LBA of
-150 which messes up session recognition. Works around VMWare issue in #4439.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32990 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-09-08 00:45:16 +00:00
parent f4f2f6f565
commit 3e513e1b8b

View File

@ -635,6 +635,13 @@ Disc::GetSession(int32 index)
PRINT(("found session #%ld info (data session)\n", index));
off_t startLBA = track->start_lba;
if (startLBA < 0) {
WARN(("%s: warning: invalid negative start LBA of %lld"
" for data track assuming 0\n", kModuleDebugName,
startLBA));
startLBA = 0;
}
off_t endLBA = track->next
? ((struct track*)track->next)->start_lba
: session->end_lba;