Lines Matching defs:found
309 * Find the FAT cache block associated with the given cluster. If not found,
311 * used block (writing it out first if it was dirty). Move the found cache
319 struct fat_cache_block *found;
332 found = fat_cache_mru;
333 while (found->chunk != chunk && found->next != NULL)
335 prev = found;
336 found = found->next;
343 if (found->chunk != chunk)
350 if (found->dirty)
352 // fprintf(stderr, "Writing FAT sector %u\n", found->sector);
358 io_offset += found->chunk * FAT_CHUNK_SIZE;
365 if (deblock_write(gFS, found->buffer, found->length) != found->length)
371 found->dirty = 0;
375 found->chunk = chunk;
376 found->length = length;
385 // fprintf(stderr, "Reading FAT sector %u\n", found->sector);
391 if (deblock_read(gFS, found->buffer, length) != length)
399 * Move the found buffer to the head of the MRU list.
401 if (found != fat_cache_mru)
404 prev->next = found->next;
405 found->next = fat_cache_mru;
406 fat_cache_mru = found;
409 return found;