Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/msdosfs/fat.h
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
* in pm_fatentrysize. | * in pm_fatentrysize. | ||||
*/ | */ | ||||
#define FAT12(pmp) (pmp->pm_fatmask == FAT12_MASK) | #define FAT12(pmp) (pmp->pm_fatmask == FAT12_MASK) | ||||
#define FAT16(pmp) (pmp->pm_fatmask == FAT16_MASK) | #define FAT16(pmp) (pmp->pm_fatmask == FAT16_MASK) | ||||
#define FAT32(pmp) (pmp->pm_fatmask == FAT32_MASK) | #define FAT32(pmp) (pmp->pm_fatmask == FAT32_MASK) | ||||
#define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS) | #define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS) | ||||
#ifdef _KERNEL | #if defined (_KERNEL) || defined(MAKEFS) | ||||
/* | /* | ||||
* These are the values for the function argument to the function | * These are the values for the function argument to the function | ||||
* fatentry(). | * fatentry(). | ||||
*/ | */ | ||||
#define FAT_GET 0x0001 /* get a FAT entry */ | #define FAT_GET 0x0001 /* get a FAT entry */ | ||||
#define FAT_SET 0x0002 /* set a FAT entry */ | #define FAT_SET 0x0002 /* set a FAT entry */ | ||||
#define FAT_GET_AND_SET (FAT_GET | FAT_SET) | #define FAT_GET_AND_SET (FAT_GET | FAT_SET) | ||||
/* | /* | ||||
* Flags to extendfile: | * Flags to extendfile: | ||||
*/ | */ | ||||
#define DE_CLEAR 1 /* Zero out the blocks allocated */ | #define DE_CLEAR 1 /* Zero out the blocks allocated */ | ||||
int pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp, u_long *cnp, int* sp); | int pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp, u_long *cnp, int* sp); | ||||
int clusterfree(struct msdosfsmount *pmp, u_long cn, u_long *oldcnp); | int clusterfree(struct msdosfsmount *pmp, u_long cn, u_long *oldcnp); | ||||
int clusteralloc(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith, u_long *retcluster, u_long *got); | int clusteralloc(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith, u_long *retcluster, u_long *got); | ||||
int fatentry(int function, struct msdosfsmount *pmp, u_long cluster, u_long *oldcontents, u_long newcontents); | int fatentry(int function, struct msdosfsmount *pmp, u_long cluster, u_long *oldcontents, u_long newcontents); | ||||
int freeclusterchain(struct msdosfsmount *pmp, u_long startchain); | int freeclusterchain(struct msdosfsmount *pmp, u_long startchain); | ||||
int extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, int flags); | int extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, int flags); | ||||
void fc_purge(struct denode *dep, u_int frcn); | void fc_purge(struct denode *dep, u_int frcn); | ||||
int markvoldirty(struct msdosfsmount *pmp, int dirty); | int markvoldirty(struct msdosfsmount *pmp, int dirty); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL || MAKEFS */ | ||||
#endif /* !_FS_MSDOSFS_FAT_H_ */ | #endif /* !_FS_MSDOSFS_FAT_H_ */ |