forked from len0rd/rockbox
Fix sd-as3525.c build for non-multidrive targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27114 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
90602ae076
commit
a035ed4cb0
1 changed files with 2 additions and 2 deletions
|
|
@ -904,10 +904,10 @@ int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count,
|
||||||
if(transfer > UNALIGNED_NUM_SECTORS)
|
if(transfer > UNALIGNED_NUM_SECTORS)
|
||||||
transfer = UNALIGNED_NUM_SECTORS;
|
transfer = UNALIGNED_NUM_SECTORS;
|
||||||
|
|
||||||
sd_transfer_sectors(drive, start, transfer, aligned_buffer, false);
|
sd_transfer_sectors(IF_MD2(drive,) start, transfer, aligned_buffer, false);
|
||||||
if (memcmp(buf, aligned_buffer, transfer * 512) != 0) {
|
if (memcmp(buf, aligned_buffer, transfer * 512) != 0) {
|
||||||
/* try the write again in the hope to repair the damage */
|
/* try the write again in the hope to repair the damage */
|
||||||
sd_transfer_sectors(drive, saved_start, saved_count, saved_buf, true);
|
sd_transfer_sectors(IF_MD2(drive,) saved_start, saved_count, saved_buf, true);
|
||||||
panicf("sd: verify failed: sec=%ld n=%d!", start, transfer);
|
panicf("sd: verify failed: sec=%ld n=%d!", start, transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue