Changeset View
Changeset View
Standalone View
Standalone View
sbin/fsck_msdosfs/dosfs.h
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | #define FAT32 1 /* this is a FAT32 file system */ | ||||
u_int ClusterSize; /* Cluster size in bytes */ | u_int ClusterSize; /* Cluster size in bytes */ | ||||
/* Now some statistics: */ | /* Now some statistics: */ | ||||
u_int NumFiles; /* # of plain files */ | u_int NumFiles; /* # of plain files */ | ||||
u_int NumFree; /* # of free clusters */ | u_int NumFree; /* # of free clusters */ | ||||
u_int NumBad; /* # of bad clusters */ | u_int NumBad; /* # of bad clusters */ | ||||
}; | }; | ||||
struct fatEntry { | |||||
cl_t next; /* pointer to next cluster */ | |||||
cl_t head; /* pointer to start of chain */ | |||||
u_int32_t length; /* number of clusters on chain */ | |||||
int flags; /* see below */ | |||||
}; | |||||
#define CLUST_FREE 0 /* 0 means cluster is free */ | #define CLUST_FREE 0 /* 0 means cluster is free */ | ||||
#define CLUST_FIRST 2 /* 2 is the minimum valid cluster number */ | #define CLUST_FIRST 2 /* 2 is the minimum valid cluster number */ | ||||
#define CLUST_RSRVD 0xfffffff6 /* start of reserved clusters */ | #define CLUST_RSRVD 0xfffffff6 /* start of reserved clusters */ | ||||
#define CLUST_BAD 0xfffffff7 /* a cluster with a defect */ | #define CLUST_BAD 0xfffffff7 /* a cluster with a defect */ | ||||
#define CLUST_EOFS 0xfffffff8 /* start of EOF indicators */ | #define CLUST_EOFS 0xfffffff8 /* start of EOF indicators */ | ||||
#define CLUST_EOF 0xffffffff /* standard value for last cluster */ | #define CLUST_EOF 0xffffffff /* standard value for last cluster */ | ||||
#define CLUST_DEAD 0xfdeadc0d /* error encountered */ | |||||
/* | /* | ||||
* Masks for cluster values | * Masks for cluster values | ||||
*/ | */ | ||||
#define CLUST12_MASK 0xfff | #define CLUST12_MASK 0xfff | ||||
#define CLUST16_MASK 0xffff | #define CLUST16_MASK 0xffff | ||||
#define CLUST32_MASK 0xfffffff | #define CLUST32_MASK 0xfffffff | ||||
#define FAT_USED 1 /* This fat chain is used in a file */ | |||||
#define DOSLONGNAMELEN 256 /* long name maximal length */ | #define DOSLONGNAMELEN 256 /* long name maximal length */ | ||||
#define LRFIRST 0x40 /* first long name record */ | #define LRFIRST 0x40 /* first long name record */ | ||||
#define LRNOMASK 0x1f /* mask to extract long record | #define LRNOMASK 0x1f /* mask to extract long record | ||||
* sequence number */ | * sequence number */ | ||||
/* | /* | ||||
* Architecture independent description of a directory entry | * Architecture independent description of a directory entry | ||||
Show All 26 Lines |