Ticket #3690: fat_mirror.diff

File fat_mirror.diff, 633 bytes (added by romain, 11 years ago)
  • fat.c

     
    2929mirror_fats(nspace *vol, uint32 sector, uint8 *buffer)
    3030{
    3131    uint32 i;
    32     char *buf = buffer;
    3332
    3433    if (!vol->fat_mirrored)
    3534        return B_OK;
     
    4342
    4443        blockData = block_cache_get_writable_etc(vol->fBlockCache, sector
    4544            + i * vol->sectors_per_fat, 0, 1, -1);
    46         memcpy(blockData, buf, vol->bytes_per_sector);
    47         buf += vol->bytes_per_sector;
     45        memcpy(blockData, buffer, vol->bytes_per_sector);
    4846        block_cache_put(vol->fBlockCache, sector + i * vol->sectors_per_fat);
    4947    }