Lines Matching +full:manufacture +full:- +full:date

3 /*-
4 * SPDX-License-Identifier: BSD-4-Clause
36 /*-
81 return (de->de_inode != *a) || (de->de_refcnt <= 0); in de_vncmpf()
87 * pmp - address of msdosfsmount structure of the filesystem containing
90 * dirclust - which cluster bp contains, if dirclust is 0 (root directory)
93 * diroffset - offset past begin of cluster of denode we want
94 * lkflags - locking flags (LK_NOWAIT)
95 * depp - returns the address of the gotten denode.
103 struct mount *mntp = pmp->pm_mountp; in deget()
121 dirclust = pmp->pm_rootdirblk; in deget()
147 if ((*depp)->de_dirclust != dirclust) { in deget()
149 pmp->pm_mountp->mnt_stat.f_mntonname, in deget()
150 (*depp)->de_dirclust, dirclust); in deget()
153 if ((*depp)->de_diroffset != diroffset) { in deget()
155 pmp->pm_mountp->mnt_stat.f_mntonname, in deget()
156 (*depp)->de_diroffset, diroffset); in deget()
179 nvp->v_data = ldep; in deget()
180 ldep->de_vnode = nvp; in deget()
181 ldep->de_flag = 0; in deget()
182 ldep->de_dirclust = dirclust; in deget()
183 ldep->de_diroffset = diroffset; in deget()
184 ldep->de_inode = inode; in deget()
185 cluster_init_vn(&ldep->de_clusterw); in deget()
186 lockmgr(nvp->v_vnlock, LK_EXCLUSIVE | LK_NOWITNESS, NULL); in deget()
205 *depp = xvp->v_data; in deget()
209 ldep->de_pmp = pmp; in deget()
210 ldep->de_refcnt = 1; in deget()
215 (FAT32(pmp) && dirclust == pmp->pm_rootdirblk)) && in deget()
219 * so we manufacture one. We should probably rummage in deget()
221 * exists), and then use the time and date from that entry in deget()
222 * as the time and date for the root denode. in deget()
224 nvp->v_vflag |= VV_ROOT; /* should be further down XXX */ in deget()
226 ldep->de_Attributes = ATTR_DIRECTORY; in deget()
227 ldep->de_LowerCase = 0; in deget()
229 ldep->de_StartCluster = pmp->pm_rootdirblk; in deget()
232 ldep->de_StartCluster = MSDOSFSROOT; in deget()
233 ldep->de_FileSize = pmp->pm_rootdirsize * DEV_BSIZE; in deget()
236 * fill in time and date so that fattime2timespec() doesn't in deget()
240 ldep->de_CHun = 0; in deget()
241 ldep->de_CTime = 0x0000; /* 00:00:00 */ in deget()
242 ldep->de_CDate = (0 << DD_YEAR_SHIFT) | (1 << DD_MONTH_SHIFT) in deget()
245 ldep->de_ADate = ldep->de_CDate; in deget()
246 ldep->de_MTime = ldep->de_CTime; in deget()
247 ldep->de_MDate = ldep->de_CDate; in deget()
257 ldep->de_Name[0] = SLOT_DELETED; in deget()
271 if (ldep->de_Attributes & ATTR_DIRECTORY) { in deget()
285 if (diroffset == 0 && ldep->de_StartCluster != dirclust) { in deget()
288 dirclust, ldep->de_StartCluster); in deget()
290 ldep->de_StartCluster = dirclust; in deget()
293 nvp->v_type = VDIR; in deget()
294 if (ldep->de_StartCluster != MSDOSFSROOT) { in deget()
297 ldep->de_FileSize = de_cn2off(pmp, size); in deget()
306 nvp->v_type = VREG; in deget()
308 ldep->de_modrev = init_va_filerev(); in deget()
322 if (DETOV(dep)->v_mount->mnt_flag & MNT_RDONLY) { in deupdat()
323 dep->de_flag &= ~(DE_UPDATE | DE_CREATE | DE_ACCESS | in deupdat()
329 if ((dep->de_flag & DE_MODIFIED) == 0 && waitfor == 0) in deupdat()
331 dep->de_flag &= ~DE_MODIFIED; in deupdat()
332 if (DETOV(dep)->v_vflag & VV_ROOT) in deupdat()
334 if (dep->de_refcnt <= 0) in deupdat()
341 if (waitfor == 0 || (bp->b_flags & B_DELWRI) == 0) { in deupdat()
347 if ((DETOV(dep)->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) in deupdat()
348 bp->b_flags |= B_CLUSTEROK; in deupdat()
370 int isadir = dep->de_Attributes & ATTR_DIRECTORY; in detrunc()
372 struct msdosfsmount *pmp = dep->de_pmp; in detrunc()
375 printf("detrunc(): file %s, length %lu, flags %x\n", dep->de_Name, length, flags); in detrunc()
386 if ((DETOV(dep)->v_vflag & VV_ROOT) && !FAT32(pmp)) { in detrunc()
389 dep->de_dirclust, dep->de_diroffset); in detrunc()
394 if (dep->de_FileSize < length) in detrunc()
407 chaintofree = dep->de_StartCluster; in detrunc()
408 dep->de_StartCluster = 0; in detrunc()
411 error = pcbmap(dep, de_clcount(pmp, length) - 1, 0, in detrunc()
428 if ((boff = length & pmp->pm_crbomask) != 0) { in detrunc()
431 error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster, in detrunc()
435 pmp->pm_bpcluster, cred, &bp); in detrunc()
443 memset(bp->b_data + boff, 0, pmp->pm_bpcluster - boff); in detrunc()
454 dep->de_FileSize = length; in detrunc()
456 dep->de_flag |= DE_UPDATE | DE_MODIFIED; in detrunc()
457 allerror = vtruncbuf(DETOV(dep), length, pmp->pm_bpcluster); in detrunc()
483 fc_setcache(dep, FC_LASTFC, de_cluster(pmp, length - 1), in detrunc()
503 struct msdosfsmount *pmp = dep->de_pmp; in deextend()
513 if ((vp->v_vflag & VV_ROOT) != 0 && !FAT32(pmp)) in deextend()
519 if (dep->de_Attributes & ATTR_DIRECTORY) in deextend()
522 if (length <= dep->de_FileSize) in deextend()
528 count = de_clcount(pmp, length) - de_clcount(pmp, dep->de_FileSize); in deextend()
530 if (count > pmp->pm_freeclustercount) in deextend()
550 error = bread(vp, de_cluster(pmp, dep->de_FileSize), pmp->pm_bpcluster, in deextend()
555 eof_clusteroff = de_cn2off(pmp, de_cluster(pmp, dep->de_FileSize)); in deextend()
556 vfs_bio_bzero_buf(bp, dep->de_FileSize - eof_clusteroff, in deextend()
557 pmp->pm_bpcluster - dep->de_FileSize + eof_clusteroff); in deextend()
566 dep->de_FileSize = length; in deextend()
567 dep->de_flag |= DE_UPDATE | DE_MODIFIED; in deextend()
572 (void)detrunc(dep, dep->de_FileSize, 0, cred); in deextend()
590 * so we must remove it from the cache and re-enter it with the in reinsert()
594 if (dep->de_Attributes & ATTR_DIRECTORY) in reinsert()
598 dep->de_inode = DETOI(dep->de_pmp, dep->de_dirclust, dep->de_diroffset); in reinsert()
601 dep->de_inode, dep->de_refcnt, vp); in reinsert()
603 vfs_hash_rehash(vp, dep->de_inode); in reinsert()
609 struct vnode *vp = ap->a_vp; in msdosfs_reclaim()
614 dep, dep->de_Name, dep->de_refcnt); in msdosfs_reclaim()
622 dep->de_inode, dep->de_refcnt, vp); in msdosfs_reclaim()
629 dep->de_flag = 0; in msdosfs_reclaim()
632 vp->v_data = NULL; in msdosfs_reclaim()
640 struct vnode *vp = ap->a_vp; in msdosfs_inactive()
645 printf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]); in msdosfs_inactive()
651 if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY) in msdosfs_inactive()
661 dep, dep->de_refcnt, (unsigned long long)vp->v_mount->mnt_flag, in msdosfs_inactive()
664 if (dep->de_refcnt <= 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { in msdosfs_inactive()
666 dep->de_flag |= DE_UPDATE; in msdosfs_inactive()
667 dep->de_Name[0] = SLOT_DELETED; in msdosfs_inactive()
678 vrefcnt(vp), dep->de_Name[0]); in msdosfs_inactive()
680 if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY) in msdosfs_inactive()