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


Ignore:
Timestamp:
2011-04-19T08:03:45Z (13 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3dbe4ca2
Parents:
97bc3ee
Message:

Improve code style for my changes. Adding macros for determining type of FAT and cluster value

File:
1 edited

Legend:

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

    r97bc3ee rd260a95  
    10021002        }
    10031003
    1004         /* Storing FAT type (12, 16, 32) in reserved field (bs->reserved) */
    1005         if (CC(bs) < 4085) {
    1006         /* Volume is FAT12 */
    1007             printf("Found FAT12 filesystem\n");
    1008             (bs)->reserved = 12;
    1009         } else if (CC(bs) < 65525) {
    1010         /* Volume is FAT16 */
    1011             printf("Found FAT16 filesystem\n");
    1012             (bs)->reserved = 16;
    1013         } else {
    1014         /* Volume is FAT32 */
    1015             printf("FAT32 filesystem is not supported by FAT server. Sorry.\n");
    1016             block_fini(devmap_handle);
    1017             async_answer_0(rid, ENOTSUP);
    1018             return;
    1019 
    1020         }
     1004        /* Determining type of FAT  */
     1005        if (FAT_IS_FAT12(bs)) {
     1006                printf("Found FAT12 filesystem\n");
     1007        } else if (FAT_IS_FAT16(bs)) {
     1008                printf("Found FAT16 filesystem\n");
     1009        } else {
     1010                printf("FAT32 filesystem is not supported by FAT server.\n");
     1011                block_fini(devmap_handle);
     1012                async_answer_0(rid, ENOTSUP);
     1013                return;
     1014        }
    10211015
    10221016        /* Do some simple sanity checks on the file system. */
Note: See TracChangeset for help on using the changeset viewer.