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


Ignore:
Timestamp:
2008-10-27T12:45:08Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ec862d
Parents:
e17d986
Message:

Pass the buffer holding the boot sector to the internal functions so that it
doesn't have to be block_get()'ed in each function. The idea is that the boot
block should be read by the top-level functions in fat_ops.c and passed down the
call chain.

File:
1 edited

Legend:

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

    re17d986 rcb682eb  
    5151#define FAT_CLST_ROOT           FAT_CLST_RES1
    5252
    53 
    5453/* forward declarations */
    5554struct block;
    5655struct fat_node;
     56struct fat_bs;
    5757
    5858typedef uint16_t fat_cluster_t;
    5959
    60 #define fat_block_get(np, off) \
    61     _fat_block_get((np)->idx->dev_handle, (np)->firstc, (off))
     60#define fat_block_get(bs, np, off) \
     61    _fat_block_get((bs), (np)->idx->dev_handle, (np)->firstc, (off))
    6262   
    63 extern struct block *_fat_block_get(dev_handle_t, fat_cluster_t, off_t);
    64 extern uint16_t _fat_blcks_get(dev_handle_t, fat_cluster_t, fat_cluster_t *);
    65 extern uint16_t fat_bps_get(dev_handle_t);
     63extern struct block *_fat_block_get(struct fat_bs *, dev_handle_t,
     64    fat_cluster_t, off_t);
     65extern uint16_t _fat_blcks_get(struct fat_bs *, dev_handle_t, fat_cluster_t,
     66    fat_cluster_t *);
    6667 
    67 extern void fat_append_clusters(struct fat_node *, fat_cluster_t);
    68 extern int fat_alloc_clusters(dev_handle_t, unsigned, fat_cluster_t *,
    69     fat_cluster_t *);
    70 extern void fat_alloc_shadow_clusters(dev_handle_t, fat_cluster_t *, unsigned);
    71 extern void fat_mark_cluster(dev_handle_t, unsigned, fat_cluster_t,
     68extern void fat_append_clusters(struct fat_bs *, struct fat_node *,
    7269    fat_cluster_t);
    73 extern void fat_fill_gap(struct fat_node *, fat_cluster_t, off_t);
     70extern int fat_alloc_clusters(struct fat_bs *, dev_handle_t, unsigned,
     71    fat_cluster_t *, fat_cluster_t *);
     72extern void fat_alloc_shadow_clusters(struct fat_bs *, dev_handle_t,
     73    fat_cluster_t *, unsigned);
     74extern void fat_mark_cluster(struct fat_bs *, dev_handle_t, unsigned,
     75    fat_cluster_t, fat_cluster_t);
     76extern void fat_fill_gap(struct fat_bs *, struct fat_node *, fat_cluster_t,
     77    off_t);
    7478
    7579#endif
Note: See TracChangeset for help on using the changeset viewer.