Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3505 → Rev 3506

/trunk/uspace/srv/fs/fat/fat.h
33,6 → 33,7
#ifndef FAT_FAT_H_
#define FAT_FAT_H_
 
#include "fat_fat.h"
#include <ipc/ipc.h>
#include <libfs.h>
#include <atomic.h>
44,6 → 45,11
#define dprintf(...) printf(__VA_ARGS__)
#endif
 
#define min(a, b) ((a) < (b) ? (a) : (b))
 
#define BS_BLOCK 0
#define BS_SIZE 512
 
typedef struct {
uint8_t ji[3]; /**< Jump instruction. */
uint8_t oem_name[8];
115,7 → 121,7
};
} __attribute__ ((packed)) fat_bs_t;
 
typedef uint16_t fat_cluster_t;
#define FAT_BS(b) ((fat_bs_t *)((b)->data))
 
typedef enum {
FAT_INVALID,
191,6 → 197,16
bool dirty;
} fat_node_t;
 
/* TODO move somewhere else */
typedef struct block {
void *data;
size_t size;
bool dirty;
} block_t;
 
extern block_t *block_get(dev_handle_t, off_t, size_t);
extern void block_put(block_t *);
 
extern fs_reg_t fat_reg;
 
extern void fat_mounted(ipc_callid_t, ipc_call_t *);