Ignore:
File:
1 edited

Legend:

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

    rffa2c8ef r852b801  
    3535
    3636#include "fat_fat.h"
    37 #include <fibril_synch.h>
     37#include <ipc/ipc.h>
     38#include <fibril_sync.h>
    3839#include <libfs.h>
    3940#include <atomic.h>
     
    4748
    4849#define min(a, b)               ((a) < (b) ? (a) : (b))
    49 
    50 /*
    51  * Convenience macros for accessing some frequently used boot sector members.
    52  */
    53 #define BPS(bs)         uint16_t_le2host((bs)->bps)
    54 #define SPC(bs)         (bs)->spc
    55 #define RSCNT(bs)       uint16_t_le2host((bs)->rscnt)
    56 #define FATCNT(bs)      (bs)->fatcnt
    57 #define SF(bs)          uint16_t_le2host((bs)->sec_per_fat)
    58 #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))
    6250
    6351#define BS_BLOCK                0
     
    131119                        /** Signature. */
    132120                        uint16_t        signature;
    133                 } fat32 __attribute__ ((packed));
    134         };
     121                } __attribute__ ((packed));
     122        }; 
    135123} __attribute__ ((packed)) fat_bs_t;
    136124
     
    175163
    176164        fibril_mutex_t  lock;
    177         devmap_handle_t devmap_handle;
     165        dev_handle_t    dev_handle;
    178166        fs_index_t      index;
    179167        /**
     
    206194        /** FAT in-core node free list link. */
    207195        link_t                  ffn_link;
    208         aoff64_t                size;
     196        size_t                  size;
    209197        unsigned                lnkcnt;
    210198        unsigned                refcnt;
    211199        bool                    dirty;
    212 
    213         /*
    214          * Cache of the node's last and "current" cluster to avoid some
    215          * unnecessary FAT walks.
    216          */
    217         /* Node's last cluster in FAT. */
    218         bool            lastc_cached_valid;
    219         fat_cluster_t   lastc_cached_value;
    220         /* Node's "current" cluster, i.e. where the last I/O took place. */
    221         bool            currc_cached_valid;
    222         aoff64_t        currc_cached_bn;
    223         fat_cluster_t   currc_cached_value;
    224200} fat_node_t;
    225201
     
    228204extern void fat_mounted(ipc_callid_t, ipc_call_t *);
    229205extern void fat_mount(ipc_callid_t, ipc_call_t *);
    230 extern void fat_unmounted(ipc_callid_t, ipc_call_t *);
    231 extern void fat_unmount(ipc_callid_t, ipc_call_t *);
    232206extern void fat_lookup(ipc_callid_t, ipc_call_t *);
    233207extern void fat_read(ipc_callid_t, ipc_call_t *);
     
    241215extern void fat_sync(ipc_callid_t, ipc_call_t *);
    242216
    243 extern int fat_idx_get_new(fat_idx_t **, devmap_handle_t);
    244 extern fat_idx_t *fat_idx_get_by_pos(devmap_handle_t, fat_cluster_t, unsigned);
    245 extern fat_idx_t *fat_idx_get_by_index(devmap_handle_t, fs_index_t);
     217extern fat_idx_t *fat_idx_get_new(dev_handle_t);
     218extern fat_idx_t *fat_idx_get_by_pos(dev_handle_t, fat_cluster_t, unsigned);
     219extern fat_idx_t *fat_idx_get_by_index(dev_handle_t, fs_index_t);
    246220extern void fat_idx_destroy(fat_idx_t *);
    247221extern void fat_idx_hashin(fat_idx_t *);
     
    250224extern int fat_idx_init(void);
    251225extern void fat_idx_fini(void);
    252 extern int fat_idx_init_by_devmap_handle(devmap_handle_t);
    253 extern void fat_idx_fini_by_devmap_handle(devmap_handle_t);
     226extern int fat_idx_init_by_dev_handle(dev_handle_t);
     227extern void fat_idx_fini_by_dev_handle(dev_handle_t);
    254228
    255229#endif
Note: See TracChangeset for help on using the changeset viewer.