mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Add rewind tracking to aaruformatContext and initialize in create.c
This commit is contained in:
10
src/write.c
10
src/write.c
@@ -146,6 +146,16 @@ int32_t aaruf_write_sector(void *context, uint64_t sector_address, bool negative
|
||||
}
|
||||
|
||||
// TODO: Check rewinded for disabling checksums
|
||||
if(!ctx->rewinded)
|
||||
{
|
||||
if(sector_address <= ctx->last_written_block)
|
||||
{
|
||||
TRACE("Rewinded");
|
||||
ctx->rewinded = true;
|
||||
}
|
||||
else
|
||||
ctx->last_written_block = sector_address;
|
||||
}
|
||||
|
||||
// TODO: If optical disc check track
|
||||
|
||||
|
||||
Reference in New Issue
Block a user