Changeset 17fa0280 in mainline


Ignore:
Timestamp:
2011-06-12T10:41:14Z (13 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e65e406
Parents:
b9060a83
Message:

Fix fat_set_cluster_fat32. Now it is possible to do write on FAT32 fs
on both litle and big endian archs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_fat.c

    rb9060a83 r17fa0280  
    591591        aoff64_t offset;
    592592        int rc;
     593        fat_cluster_t temp;
    593594
    594595        offset = (clst * FAT32_CLST_SIZE);
     
    599600                return rc;
    600601
    601         value = host2uint32_t_le(value);
    602         *(uint32_t *)(b->data + offset % BPS(bs)) &= 0xf0000000;
    603         *(uint32_t *)(b->data + offset % BPS(bs)) |= (value & FAT32_MASK);
     602        temp = uint32_t_le2host(*(uint32_t *)(b->data + offset % BPS(bs)));
     603        temp &= 0xf0000000;
     604        temp |= (value & FAT32_MASK);
     605        *(uint32_t *)(b->data + offset % BPS(bs)) = host2uint32_t_le(temp);
    604606
    605607        b->dirty = true;        /* need to sync block */
Note: See TracChangeset for help on using the changeset viewer.