mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Don't panic on read attempts past end of card, just exit with error. Such can happen when mounting superfloppy MMC, without valid partition table.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6179 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2dddde253f
commit
fe0e368d5c
1 changed files with 5 additions and 1 deletions
|
@ -647,7 +647,11 @@ int ata_read_sectors(IF_MV2(int drive,)
|
|||
ret = select_card(current_card);
|
||||
#endif
|
||||
if (start + incount > card->numsectors)
|
||||
panicf("Reading past end of card\n");
|
||||
{
|
||||
ret = -1;
|
||||
/* panicf("Reading %d@%d, past end of card %d\n",
|
||||
incount, start, card->numsectors); */
|
||||
}
|
||||
|
||||
/* some cards don't like reading the very last sector with
|
||||
* CMD_READ_MULTIPLE_BLOCK, so make sure this sector is always
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue