Ignore:
File:
1 edited

Legend:

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

    refcebe1 r5d95f02  
    11/*
    22 * Copyright (c) 2008 Jakub Jermar
     3 * Copyright (c) 2011 Oleg Romanenko
    34 * All rights reserved.
    45 *
     
    4647#endif
    4748
    48 #define min(a, b)               ((a) < (b) ? (a) : (b))
     49#define min(a, b)       ((a) < (b) ? (a) : (b))
    4950
    5051/*
     
    5556#define RSCNT(bs)       uint16_t_le2host((bs)->rscnt)
    5657#define FATCNT(bs)      (bs)->fatcnt
    57 #define SF(bs)          uint16_t_le2host((bs)->sec_per_fat)
     58
     59#define SF(bs)          (uint16_t_le2host((bs)->sec_per_fat) ? \
     60    uint16_t_le2host((bs)->sec_per_fat) : \
     61    uint32_t_le2host(bs->fat32.sectors_per_fat))
     62
    5863#define RDE(bs)         uint16_t_le2host((bs)->root_ent_max)
    59 #define TS(bs)          (uint16_t_le2host((bs)->totsec16) != 0 ? \
    60                         uint16_t_le2host((bs)->totsec16) : \
    61                         uint32_t_le2host(bs->totsec32))
    62 
    63 #define BS_BLOCK                0
    64 #define BS_SIZE                 512
     64
     65#define TS(bs)          (uint16_t_le2host((bs)->totsec16) ? \
     66    uint16_t_le2host((bs)->totsec16) : \
     67    uint32_t_le2host(bs->totsec32))
     68
     69#define BS_BLOCK        0
     70#define BS_SIZE         512
    6571
    6672typedef struct fat_bs {
     
    175181
    176182        fibril_mutex_t  lock;
    177         devmap_handle_t devmap_handle;
     183        service_id_t    service_id;
    178184        fs_index_t      index;
    179185        /**
     
    227233extern libfs_ops_t fat_libfs_ops;
    228234
    229 extern int fat_idx_get_new(fat_idx_t **, devmap_handle_t);
    230 extern fat_idx_t *fat_idx_get_by_pos(devmap_handle_t, fat_cluster_t, unsigned);
    231 extern fat_idx_t *fat_idx_get_by_index(devmap_handle_t, fs_index_t);
     235extern int fat_idx_get_new(fat_idx_t **, service_id_t);
     236extern fat_idx_t *fat_idx_get_by_pos(service_id_t, fat_cluster_t, unsigned);
     237extern fat_idx_t *fat_idx_get_by_index(service_id_t, fs_index_t);
    232238extern void fat_idx_destroy(fat_idx_t *);
    233239extern void fat_idx_hashin(fat_idx_t *);
     
    236242extern int fat_idx_init(void);
    237243extern void fat_idx_fini(void);
    238 extern int fat_idx_init_by_devmap_handle(devmap_handle_t);
    239 extern void fat_idx_fini_by_devmap_handle(devmap_handle_t);
     244extern int fat_idx_init_by_service_id(service_id_t);
     245extern void fat_idx_fini_by_service_id(service_id_t);
    240246
    241247#endif
Note: See TracChangeset for help on using the changeset viewer.