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

3 /*-
4 * SPDX-License-Identifier: BSD-4-Clause
36 /*-
73 * pmp - address of msdosfsmount structure of the filesystem containing
76 * dirclust - which cluster bp contains, if dirclust is 0 (root directory)
79 * diroffset - offset past begin of cluster of denode we want
80 * depp - returns the address of the gotten denode.
100 dirclust = pmp->pm_rootdirblk; in deget()
102 inode = (uint64_t)pmp->pm_bpcluster * dirclust + diroffset; in deget()
105 ldep->de_vnode = NULL; in deget()
106 ldep->de_flag = 0; in deget()
107 ldep->de_dirclust = dirclust; in deget()
108 ldep->de_diroffset = diroffset; in deget()
109 ldep->de_inode = inode; in deget()
110 ldep->de_pmp = pmp; in deget()
111 ldep->de_refcnt = 1; in deget()
117 || (FAT32(pmp) && dirclust == pmp->pm_rootdirblk)) in deget()
121 * so we manufacture one. We should probably rummage in deget()
123 * exists), and then use the time and date from that entry in deget()
124 * as the time and date for the root denode. in deget()
126 ldep->de_vnode = (struct vnode *)-1; in deget()
128 ldep->de_Attributes = ATTR_DIRECTORY; in deget()
129 ldep->de_LowerCase = 0; in deget()
131 ldep->de_StartCluster = pmp->pm_rootdirblk; in deget()
134 ldep->de_StartCluster = MSDOSFSROOT; in deget()
135 ldep->de_FileSize = pmp->pm_rootdirsize * DEV_BSIZE; in deget()
138 * fill in time and date so that dos2unixtime() doesn't in deget()
142 ldep->de_CHun = 0; in deget()
143 ldep->de_CTime = 0x0000; /* 00:00:00 */ in deget()
144 ldep->de_CDate = (0 << DD_YEAR_SHIFT) | (1 << DD_MONTH_SHIFT) in deget()
147 ldep->de_ADate = ldep->de_CDate; in deget()
148 ldep->de_MTime = ldep->de_CTime; in deget()
149 ldep->de_MDate = ldep->de_CDate; in deget()
154 ldep->de_Name[0] = SLOT_DELETED; in deget()
167 if (ldep->de_Attributes & ATTR_DIRECTORY) { in deget()
181 if (diroffset == 0 && ldep->de_StartCluster != dirclust) { in deget()
183 dirclust, ldep->de_StartCluster)); in deget()
185 ldep->de_StartCluster = dirclust; in deget()
188 if (ldep->de_StartCluster != MSDOSFSROOT) { in deget()
191 ldep->de_FileSize = de_cn2off(pmp, size); in deget()
214 int isadir = dep->de_Attributes & ATTR_DIRECTORY; in detrunc()
216 struct msdosfsmount *pmp = dep->de_pmp; in detrunc()
219 dep->de_Name, length, flags)); in detrunc()
229 if (dep->de_vnode != NULL && !FAT32(pmp)) { in detrunc()
232 dep->de_dirclust, dep->de_diroffset)); in detrunc()
237 if (dep->de_FileSize < length) in detrunc()
250 chaintofree = dep->de_StartCluster; in detrunc()
251 dep->de_StartCluster = 0; in detrunc()
254 error = pcbmap(dep, de_clcount(pmp, length) - 1, 0, in detrunc()
270 if ((boff = length & pmp->pm_crbomask) != 0) { in detrunc()
273 error = bread((void *)pmp->pm_devvp, bn, in detrunc()
274 pmp->pm_bpcluster, 0, &bp); in detrunc()
282 memset(bp->b_data + boff, 0, pmp->pm_bpcluster - boff); in detrunc()
291 dep->de_FileSize = length; in detrunc()
293 dep->de_flag |= DE_UPDATE|DE_MODIFIED; in detrunc()
308 fc_setcache(dep, FC_LASTFC, de_cluster(pmp, length - 1), in detrunc()
328 struct msdosfsmount *pmp = dep->de_pmp; in deextend()
335 if (dep->de_vnode != NULL && !FAT32(pmp)) in deextend()
341 if (dep->de_Attributes & ATTR_DIRECTORY) in deextend()
344 if (length <= dep->de_FileSize) in deextend()
350 count = de_clcount(pmp, length) - de_clcount(pmp, dep->de_FileSize); in deextend()
352 if (count > pmp->pm_freeclustercount) in deextend()
357 (void) detrunc(dep, dep->de_FileSize, 0, cred); in deextend()
367 dep->de_FileSize = length; in deextend()
368 dep->de_flag |= DE_UPDATE | DE_MODIFIED; in deextend()