Lines Matching refs:dep
194 * Truncate the file described by dep to the length specified by length.
197 msdosfs_detrunc(struct denode *dep, u_long length, int flags,
206 int isadir = dep->de_Attributes & ATTR_DIRECTORY;
208 struct msdosfsmount *pmp = dep->de_pmp;
211 printf("detrunc(): file %s, length %lu, flags %x\n", dep->de_Name, length, flags);
222 if (dep->de_vnode != NULL && !FAT32(pmp)) {
224 dep->de_dirclust, dep->de_diroffset);
228 if (dep->de_FileSize < length)
229 return (msdosfs_deextend(dep, length, cred));
242 chaintofree = dep->de_StartCluster;
243 dep->de_StartCluster = 0;
246 error = msdosfs_pcbmap(dep, lastblock, 0, &eofentry, 0);
284 dep->de_FileSize = length;
286 dep->de_flag |= DE_UPDATE|DE_MODIFIED;
318 * Extend the file described by dep to length specified by length.
321 msdosfs_deextend(struct denode *dep, u_long length, struct kauth_cred *cred)
323 struct msdosfsmount *pmp = dep->de_pmp;
330 if (dep->de_vnode != NULL && !FAT32(pmp))
336 if (dep->de_Attributes & ATTR_DIRECTORY)
339 if (length <= dep->de_FileSize)
345 count = de_clcount(pmp, length) - de_clcount(pmp, dep->de_FileSize);
349 error = msdosfs_extendfile(dep, count, NULL, NULL, DE_CLEAR);
352 (void) msdosfs_detrunc(dep, dep->de_FileSize, 0, cred);
362 dep->de_FileSize = length;
363 dep->de_flag |= DE_UPDATE|DE_MODIFIED;