mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-29 18:18:54 +00:00
ffat: Release packets in block session backend
This patch adds the necessary 'release_packet()' calls in the block session backend of the 'ffat' lib. Fixes #272.
This commit is contained in:
parent
69ec6f5dd8
commit
b2a62b4b2d
@ -112,6 +112,7 @@ extern "C" DRESULT disk_read(BYTE drv, BYTE *buff, DWORD sector, BYTE count)
|
||||
/* check for success of operation */
|
||||
if (!p.succeeded()) {
|
||||
PERR("Could not read block(s)");
|
||||
_source->release_packet(p);
|
||||
return RES_ERROR;
|
||||
}
|
||||
|
||||
@ -124,6 +125,7 @@ extern "C" DRESULT disk_read(BYTE drv, BYTE *buff, DWORD sector, BYTE count)
|
||||
PDBG("%8x: %2x %c", i, buff[i], buff[i] >= 32 ? buff[i] : '-');
|
||||
#endif
|
||||
|
||||
_source->release_packet(p);
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
@ -152,9 +154,11 @@ extern "C" DRESULT disk_write(BYTE drv, const BYTE *buff, DWORD sector, BYTE cou
|
||||
/* check for success of operation */
|
||||
if (!p.succeeded()) {
|
||||
PERR("Could not write block(s)");
|
||||
_source->release_packet(p);
|
||||
return RES_ERROR;
|
||||
}
|
||||
|
||||
_source->release_packet(p);
|
||||
return RES_OK;
|
||||
}
|
||||
#endif /* _READONLY */
|
||||
|
Loading…
Reference in New Issue
Block a user