Changeset 97bc3ee in mainline for uspace/srv/fs/fat/fat_fat.h


Ignore:
Timestamp:
2011-04-09T19:23:12Z (14 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d260a95
Parents:
fc35e98
Message:

Full support for FAT12 file system. Correct creating directories and files. Fixing addressing issue.
Type of FAT (12,16,32) is determined only on the basis of the count of clusters(according to Microsoft FAT specification). I.e. FAT
with 4085 clusters or less will be determined as FAT12. FAT16 must contain more than 4085 clusters but less then 65525.

File:
1 edited

Legend:

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

    rfc35e98 r97bc3ee  
    2929/** @addtogroup fs
    3030 * @{
    31  */ 
     31 */
    3232
    3333#ifndef FAT_FAT_FAT_H_
     
    5656#define FAT_CLST_ROOT           FAT_CLST_RES1
    5757
    58 #define FATTYPE(bs)      (bs)->reserved
     58/*
     59 * Convenience macros for computing some frequently used values from the
     60 * primitive boot sector members.
     61 */
     62#define RDS(bs)         ((sizeof(fat_dentry_t) * RDE((bs))) / BPS((bs))) + \
     63                        (((sizeof(fat_dentry_t) * RDE((bs))) % BPS((bs))) != 0)
     64#define SSA(bs)         (RSCNT((bs)) + FATCNT((bs)) * SF((bs)) + RDS(bs))
     65#define DS(bs)          (TS(bs) - SSA(bs))
     66#define CC(bs)          (DS(bs) / SPC(bs))
     67#define FATTYPE(bs)     (bs)->reserved
    5968
    6069/* forward declarations */
Note: See TracChangeset for help on using the changeset viewer.