Changeset 0f57d0e in mainline for uspace/srv/fs/fat/fat.h


Ignore:
Timestamp:
2008-10-26T14:10:53Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1178d0
Parents:
033ef7d3
Message:

Move functionality related to manipulatings file allocation tables to fat_fat.c.

File:
1 edited

Legend:

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

    r033ef7d3 r0f57d0e  
    3434#define FAT_FAT_H_
    3535
     36#include "fat_fat.h"
    3637#include <ipc/ipc.h>
    3738#include <libfs.h>
     
    4445#define dprintf(...)    printf(__VA_ARGS__)
    4546#endif
     47
     48#define min(a, b)               ((a) < (b) ? (a) : (b))
     49
     50#define BS_BLOCK                0
     51#define BS_SIZE                 512
    4652
    4753typedef struct {
     
    116122} __attribute__ ((packed)) fat_bs_t;
    117123
    118 typedef uint16_t fat_cluster_t;
     124#define FAT_BS(b)               ((fat_bs_t *)((b)->data))
    119125
    120126typedef enum {
     
    192198} fat_node_t;
    193199
     200/* TODO move somewhere else */
     201typedef struct block {
     202        void *data;
     203        size_t size;
     204        bool dirty;
     205} block_t;
     206
     207extern block_t *block_get(dev_handle_t, off_t, size_t);
     208extern void block_put(block_t *);
     209
    194210extern fs_reg_t fat_reg;
    195211
Note: See TracChangeset for help on using the changeset viewer.