cbmimage
Loading...
Searching...
No Matches
fat.c File Reference

cbmimage: FAT processing functions More...

#include "cbmimage/internal.h"
#include "cbmimage/alloc.h"
#include <assert.h>
Include dependency graph for fat.c:

Macros

#define CBMIMAGE_FAT_LASTBLOCK   0xFFFFu
 
#define CBMIMAGE_FAT_UNUSED   0x0000u
 

Functions

cbmimage_fatcbmimage_fat_create (cbmimage_fileimage *image)
 create a FAT structure
 
void cbmimage_fat_close (cbmimage_fat *fat)
 close a FAT structure
 
int cbmimage_i_fat_set (cbmimage_fat *fat, cbmimage_blockaddress block, uint16_t target_lba)
 
int cbmimage_fat_set (cbmimage_fat *fat, cbmimage_blockaddress block, cbmimage_blockaddress target)
 set a block in the FAT to a target in the FAT
 
int cbmimage_fat_clear (cbmimage_fat *fat, cbmimage_blockaddress block)
 set a block in the FAT to unused
 
int cbmimage_i_fat_get_target_lba (cbmimage_fat *fat, cbmimage_blockaddress block)
 
cbmimage_blockaddress cbmimage_fat_get (cbmimage_fat *fat, cbmimage_blockaddress block)
 get the target of a block in the FAT
 
int cbmimage_fat_is_used (cbmimage_fat *fat, cbmimage_blockaddress block)
 check if a block in the FAT is marked as used
 
void cbmimage_fat_dump (cbmimage_fat *fat, int trackformat)
 dump a FAT structure
 

Detailed Description

cbmimage: FAT processing functions


Author
Spiro Trikaliotis

Macro Definition Documentation

◆ CBMIMAGE_FAT_LASTBLOCK

#define CBMIMAGE_FAT_LASTBLOCK   0xFFFFu

mark for the last block of a FAT

◆ CBMIMAGE_FAT_UNUSED

#define CBMIMAGE_FAT_UNUSED   0x0000u

mark for an unused block in a FAT