Changeset 92bee46 in mainline for uspace/srv/fs/fat/fat_ops.c


Ignore:
Timestamp:
2010-01-15T20:31:48Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
48e1467, d45660a
Parents:
61c0402
Message:

Refuse to mount FAT file systems with root directory entries that do not take up
whole blocks.

File:
1 edited

Legend:

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

    r61c0402 r92bee46  
    324324        /* Check number of sectors per FAT. */
    325325        if (bs->sec_per_fat == 0)
     326                return ENOTSUP;
     327
     328        /*
     329         * Check that the root directory entries take up whole blocks.
     330         * This check is rather strict, but it allows us to treat the root
     331         * directory and non-root directories uniformly in some places.
     332         * It can be removed provided that functions such as fat_read() are
     333         * sanitized to support file systems with this property.
     334         */
     335        if ((uint16_t_le2host(bs->root_ent_max) * sizeof(fat_dentry_t)) %
     336            uint16_t_le2host(bs->bps) != 0)
    326337                return ENOTSUP;
    327338
Note: See TracChangeset for help on using the changeset viewer.