1
0
Fork 0
forked from len0rd/rockbox

filestr_cache: Some more 64-bit sector_t fixes

This isn't strictly needed for FAT32, but the core file cache code
needs to be able to reference >32bit sector addresses.

Change-Id: I57838f1228c1d45f6a8c4755c5d1f9063c13b3dd
This commit is contained in:
Solomon Peachy 2024-11-11 10:36:02 -05:00
parent c67294913f
commit a4fe20a278
4 changed files with 8 additions and 4 deletions

View file

@ -206,7 +206,7 @@ static void handle_truncate(struct filestr_desc * const file, file_size_t size)
while ((s = fileobj_get_next_stream(&file->stream, s)))
{
/* caches with data beyond new extents are invalid */
unsigned long sector = s->cachep->sector;
sector_t sector = s->cachep->sector;
if (sector != INVALID_SECNUM && sector >= filesectors)
filestr_discard_cache(s);