Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/msdosfs/msdosfs_vnops.c
Show First 20 Lines • Show All 307 Lines • ▼ Show 20 Lines | msdosfs_getattr(struct vop_getattr_args *ap) | ||||
if (dep->de_Attributes & ATTR_HIDDEN) | if (dep->de_Attributes & ATTR_HIDDEN) | ||||
vap->va_flags |= UF_HIDDEN; | vap->va_flags |= UF_HIDDEN; | ||||
if (dep->de_Attributes & ATTR_READONLY) | if (dep->de_Attributes & ATTR_READONLY) | ||||
vap->va_flags |= UF_READONLY; | vap->va_flags |= UF_READONLY; | ||||
if (dep->de_Attributes & ATTR_SYSTEM) | if (dep->de_Attributes & ATTR_SYSTEM) | ||||
vap->va_flags |= UF_SYSTEM; | vap->va_flags |= UF_SYSTEM; | ||||
vap->va_gen = 0; | vap->va_gen = 0; | ||||
vap->va_blocksize = pmp->pm_bpcluster; | vap->va_blocksize = pmp->pm_bpcluster; | ||||
if (dep->de_StartCluster != MSDOSFSROOT) | |||||
vap->va_bytes = | vap->va_bytes = | ||||
(dep->de_FileSize + pmp->pm_crbomask) & ~pmp->pm_crbomask; | (dep->de_FileSize + pmp->pm_crbomask) & ~pmp->pm_crbomask; | ||||
else | |||||
se: The root directory of a FAT12 or FAT16 file system exists in a separate area outside the data… | |||||
vap->va_bytes = 0; /* FAT12/FAT16 root dir in reserved area */ | |||||
vap->va_type = ap->a_vp->v_type; | vap->va_type = ap->a_vp->v_type; | ||||
vap->va_filerev = dep->de_modrev; | vap->va_filerev = dep->de_modrev; | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
msdosfs_setattr(struct vop_setattr_args *ap) | msdosfs_setattr(struct vop_setattr_args *ap) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,670 Lines • Show Last 20 Lines |
The root directory of a FAT12 or FAT16 file system exists in a separate area outside the data area. The directory has a logical size of #entries * 32, but no blocks from the data area are allocated to it.