1*0a6a1f1dSLionel Sambuc /* $NetBSD: denode.h,v 1.24 2014/07/08 09:21:52 hannken Exp $ */ 284d9c625SLionel Sambuc 384d9c625SLionel Sambuc /*- 484d9c625SLionel Sambuc * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. 584d9c625SLionel Sambuc * Copyright (C) 1994, 1995, 1997 TooLs GmbH. 684d9c625SLionel Sambuc * All rights reserved. 784d9c625SLionel Sambuc * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below). 884d9c625SLionel Sambuc * 984d9c625SLionel Sambuc * Redistribution and use in source and binary forms, with or without 1084d9c625SLionel Sambuc * modification, are permitted provided that the following conditions 1184d9c625SLionel Sambuc * are met: 1284d9c625SLionel Sambuc * 1. Redistributions of source code must retain the above copyright 1384d9c625SLionel Sambuc * notice, this list of conditions and the following disclaimer. 1484d9c625SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 1584d9c625SLionel Sambuc * notice, this list of conditions and the following disclaimer in the 1684d9c625SLionel Sambuc * documentation and/or other materials provided with the distribution. 1784d9c625SLionel Sambuc * 3. All advertising materials mentioning features or use of this software 1884d9c625SLionel Sambuc * must display the following acknowledgement: 1984d9c625SLionel Sambuc * This product includes software developed by TooLs GmbH. 2084d9c625SLionel Sambuc * 4. The name of TooLs GmbH may not be used to endorse or promote products 2184d9c625SLionel Sambuc * derived from this software without specific prior written permission. 2284d9c625SLionel Sambuc * 2384d9c625SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 2484d9c625SLionel Sambuc * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2584d9c625SLionel Sambuc * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2684d9c625SLionel Sambuc * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2784d9c625SLionel Sambuc * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 2884d9c625SLionel Sambuc * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 2984d9c625SLionel Sambuc * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 3084d9c625SLionel Sambuc * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 3184d9c625SLionel Sambuc * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 3284d9c625SLionel Sambuc * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3384d9c625SLionel Sambuc */ 3484d9c625SLionel Sambuc /* 3584d9c625SLionel Sambuc * Written by Paul Popelka (paulp@uts.amdahl.com) 3684d9c625SLionel Sambuc * 3784d9c625SLionel Sambuc * You can do anything you want with this software, just don't say you wrote 3884d9c625SLionel Sambuc * it, and don't remove this notice. 3984d9c625SLionel Sambuc * 4084d9c625SLionel Sambuc * This software is provided "as is". 4184d9c625SLionel Sambuc * 4284d9c625SLionel Sambuc * The author supplies this software to be publicly redistributed on the 4384d9c625SLionel Sambuc * understanding that the author is not responsible for the correct 4484d9c625SLionel Sambuc * functioning of this software in any circumstances and is not liable for 4584d9c625SLionel Sambuc * any damages caused by this software. 4684d9c625SLionel Sambuc * 4784d9c625SLionel Sambuc * October 1992 4884d9c625SLionel Sambuc */ 4984d9c625SLionel Sambuc #ifndef _MSDOSFS_DENODE_H_ 5084d9c625SLionel Sambuc #define _MSDOSFS_DENODE_H_ 5184d9c625SLionel Sambuc 5284d9c625SLionel Sambuc #ifndef MAKEFS 5384d9c625SLionel Sambuc #include <miscfs/genfs/genfs_node.h> 5484d9c625SLionel Sambuc #else 5584d9c625SLionel Sambuc struct genfs_node { 5684d9c625SLionel Sambuc }; 5784d9c625SLionel Sambuc struct vnode; 5884d9c625SLionel Sambuc struct msdosfsmount; 5984d9c625SLionel Sambuc struct buf; 6084d9c625SLionel Sambuc #endif 6184d9c625SLionel Sambuc 6284d9c625SLionel Sambuc /* 6384d9c625SLionel Sambuc * This is the pc filesystem specific portion of the vnode structure. 6484d9c625SLionel Sambuc * 6584d9c625SLionel Sambuc * To describe a file uniquely the de_dirclust, de_diroffset, and 6684d9c625SLionel Sambuc * de_StartCluster fields are used. 6784d9c625SLionel Sambuc * 6884d9c625SLionel Sambuc * de_dirclust contains the cluster number of the directory cluster 6984d9c625SLionel Sambuc * containing the entry for a file or directory. 7084d9c625SLionel Sambuc * de_diroffset is the index into the cluster for the entry describing 7184d9c625SLionel Sambuc * a file or directory. 7284d9c625SLionel Sambuc * de_StartCluster is the number of the first cluster of the file or directory. 7384d9c625SLionel Sambuc * 7484d9c625SLionel Sambuc * Now to describe the quirks of the pc filesystem. 7584d9c625SLionel Sambuc * - Clusters 0 and 1 are reserved. 7684d9c625SLionel Sambuc * - The first allocatable cluster is 2. 7784d9c625SLionel Sambuc * - The root directory is of fixed size and all blocks that make it up 7884d9c625SLionel Sambuc * are contiguous. 7984d9c625SLionel Sambuc * - Cluster 0 refers to the root directory when it is found in the 8084d9c625SLionel Sambuc * startcluster field of a directory entry that points to another directory. 8184d9c625SLionel Sambuc * - Cluster 0 implies a 0 length file when found in the start cluster field 8284d9c625SLionel Sambuc * of a directory entry that points to a file. 8384d9c625SLionel Sambuc * - You can't use the cluster number 0 to derive the address of the root 8484d9c625SLionel Sambuc * directory. 8584d9c625SLionel Sambuc * - Multiple directory entries can point to a directory. The entry in the 8684d9c625SLionel Sambuc * parent directory points to a child directory. Any directories in the 8784d9c625SLionel Sambuc * child directory contain a ".." entry that points back to the parent. 8884d9c625SLionel Sambuc * The child directory itself contains a "." entry that points to itself. 8984d9c625SLionel Sambuc * - The root directory does not contain a "." or ".." entry. 9084d9c625SLionel Sambuc * - Directory entries for directories are never changed once they are created 9184d9c625SLionel Sambuc * (except when removed). The size stays 0, and the last modification time 9284d9c625SLionel Sambuc * is never changed. This is because so many directory entries can point to 9384d9c625SLionel Sambuc * the physical clusters that make up a directory. It would lead to an 9484d9c625SLionel Sambuc * update nightmare. 9584d9c625SLionel Sambuc * - The length field in a directory entry pointing to a directory contains 0 9684d9c625SLionel Sambuc * (always). The only way to find the end of a directory is to follow the 9784d9c625SLionel Sambuc * cluster chain until the "last cluster" marker is found. 9884d9c625SLionel Sambuc * 9984d9c625SLionel Sambuc * My extensions to make this house of cards work. These apply only to the in 10084d9c625SLionel Sambuc * memory copy of the directory entry. 10184d9c625SLionel Sambuc * - A reference count for each denode will be kept since dos doesn't keep such 10284d9c625SLionel Sambuc * things. 10384d9c625SLionel Sambuc */ 10484d9c625SLionel Sambuc 10584d9c625SLionel Sambuc /* 10684d9c625SLionel Sambuc * Internal pseudo-offset for (nonexistent) directory entry for the root 10784d9c625SLionel Sambuc * dir in the root dir 10884d9c625SLionel Sambuc */ 10984d9c625SLionel Sambuc #define MSDOSFSROOT_OFS 0x1fffffff 11084d9c625SLionel Sambuc 11184d9c625SLionel Sambuc /* 11284d9c625SLionel Sambuc * The FAT cache structure. fc_fsrcn is the filesystem relative cluster 11384d9c625SLionel Sambuc * number that corresponds to the file relative cluster number in this 11484d9c625SLionel Sambuc * structure (fc_frcn). 11584d9c625SLionel Sambuc */ 11684d9c625SLionel Sambuc struct fatcache { 11784d9c625SLionel Sambuc u_long fc_frcn; /* file relative cluster number */ 11884d9c625SLionel Sambuc u_long fc_fsrcn; /* filesystem relative cluster number */ 11984d9c625SLionel Sambuc }; 12084d9c625SLionel Sambuc 12184d9c625SLionel Sambuc /* 12284d9c625SLionel Sambuc * The FAT entry cache as it stands helps make extending files a "quick" 12384d9c625SLionel Sambuc * operation by avoiding having to scan the FAT to discover the last 12484d9c625SLionel Sambuc * cluster of the file. The cache also helps sequential reads by 12584d9c625SLionel Sambuc * remembering the last cluster read from the file. This also prevents us 12684d9c625SLionel Sambuc * from having to rescan the FAT to find the next cluster to read. This 12784d9c625SLionel Sambuc * cache is probably pretty worthless if a file is opened by multiple 12884d9c625SLionel Sambuc * processes. 12984d9c625SLionel Sambuc */ 13084d9c625SLionel Sambuc #define FC_SIZE 3 /* number of entries in the cache */ 13184d9c625SLionel Sambuc #define FC_LASTMAP 0 /* entry the last call to pcbmap() resolved 13284d9c625SLionel Sambuc * to */ 13384d9c625SLionel Sambuc #define FC_LASTFC 1 /* entry for the last cluster in the file */ 13484d9c625SLionel Sambuc #define FC_NEXTTOLASTFC 2 /* entry for a close to the last cluster in the file */ 13584d9c625SLionel Sambuc 13684d9c625SLionel Sambuc #define FCE_EMPTY 0xffffffff /* doesn't represent an actual cluster # */ 13784d9c625SLionel Sambuc 13884d9c625SLionel Sambuc /* 13984d9c625SLionel Sambuc * Set a slot in the FAT cache. 14084d9c625SLionel Sambuc */ 14184d9c625SLionel Sambuc #define fc_setcache(dep, slot, frcn, fsrcn) \ 14284d9c625SLionel Sambuc (dep)->de_fc[slot].fc_frcn = frcn; \ 14384d9c625SLionel Sambuc (dep)->de_fc[slot].fc_fsrcn = fsrcn; 14484d9c625SLionel Sambuc 14584d9c625SLionel Sambuc #define fc_last_to_nexttolast(dep) \ 14684d9c625SLionel Sambuc do { \ 14784d9c625SLionel Sambuc (dep)->de_fc[FC_NEXTTOLASTFC].fc_frcn = (dep)->de_fc[FC_LASTFC].fc_frcn; \ 14884d9c625SLionel Sambuc (dep)->de_fc[FC_NEXTTOLASTFC].fc_fsrcn = (dep)->de_fc[FC_LASTFC].fc_fsrcn; \ 14984d9c625SLionel Sambuc } while (0) 15084d9c625SLionel Sambuc 15184d9c625SLionel Sambuc 15284d9c625SLionel Sambuc /* 15384d9c625SLionel Sambuc * This is the in memory variant of a dos directory entry. It is usually 15484d9c625SLionel Sambuc * contained within a vnode. 15584d9c625SLionel Sambuc */ 156*0a6a1f1dSLionel Sambuc struct denode_key { 157*0a6a1f1dSLionel Sambuc u_long dk_dirclust; /* cluster of the directory file containing this entry */ 158*0a6a1f1dSLionel Sambuc u_long dk_diroffset; /* offset of this entry in the directory cluster */ 159*0a6a1f1dSLionel Sambuc void *dk_dirgen; /* non zero and unique for unlinked nodes */ 160*0a6a1f1dSLionel Sambuc }; 16184d9c625SLionel Sambuc struct denode { 16284d9c625SLionel Sambuc struct genfs_node de_gnode; 16384d9c625SLionel Sambuc struct vnode *de_vnode; /* addr of vnode we are part of */ 16484d9c625SLionel Sambuc struct vnode *de_devvp; /* vnode of blk dev we live on */ 16584d9c625SLionel Sambuc u_long de_flag; /* flag bits */ 16684d9c625SLionel Sambuc dev_t de_dev; /* device where direntry lives */ 167*0a6a1f1dSLionel Sambuc struct denode_key de_key; 168*0a6a1f1dSLionel Sambuc #define de_dirclust de_key.dk_dirclust 169*0a6a1f1dSLionel Sambuc #define de_diroffset de_key.dk_diroffset 170*0a6a1f1dSLionel Sambuc #define de_dirgen de_key.dk_dirgen 17184d9c625SLionel Sambuc u_long de_fndoffset; /* offset of found dir entry */ 17284d9c625SLionel Sambuc int de_fndcnt; /* number of slots before de_fndoffset */ 17384d9c625SLionel Sambuc long de_refcnt; /* reference count */ 17484d9c625SLionel Sambuc struct msdosfsmount *de_pmp; /* addr of our mount struct */ 17584d9c625SLionel Sambuc struct lockf *de_lockf; /* byte level lock list */ 17684d9c625SLionel Sambuc u_char de_Name[12]; /* name, from DOS directory entry */ 17784d9c625SLionel Sambuc u_char de_Attributes; /* attributes, from directory entry */ 17884d9c625SLionel Sambuc u_char de_CHun; /* Hundredth of second of CTime*/ 17984d9c625SLionel Sambuc u_short de_CTime; /* creation time */ 18084d9c625SLionel Sambuc u_short de_CDate; /* creation date */ 18184d9c625SLionel Sambuc u_short de_ADate; /* access date */ 18284d9c625SLionel Sambuc u_short de_MTime; /* modification time */ 18384d9c625SLionel Sambuc u_short de_MDate; /* modification date */ 18484d9c625SLionel Sambuc u_long de_StartCluster; /* starting cluster of file */ 18584d9c625SLionel Sambuc u_long de_FileSize; /* size of file in bytes */ 18684d9c625SLionel Sambuc struct fatcache de_fc[FC_SIZE]; /* FAT cache */ 18784d9c625SLionel Sambuc }; 18884d9c625SLionel Sambuc 18984d9c625SLionel Sambuc /* 19084d9c625SLionel Sambuc * Values for the de_flag field of the denode. 19184d9c625SLionel Sambuc */ 19284d9c625SLionel Sambuc #define DE_UPDATE 0x0001 /* Modification time update request. */ 19384d9c625SLionel Sambuc #define DE_CREATE 0x0002 /* Creation time update */ 19484d9c625SLionel Sambuc #define DE_ACCESS 0x0004 /* Access time update */ 19584d9c625SLionel Sambuc #define DE_MODIFIED 0x0008 /* Denode has been modified. */ 19684d9c625SLionel Sambuc #define DE_RENAME 0x0010 /* Denode is in the process of being renamed */ 19784d9c625SLionel Sambuc 19884d9c625SLionel Sambuc /* 19984d9c625SLionel Sambuc * Maximum filename length in Win95 20084d9c625SLionel Sambuc * Note: Must be < sizeof(dirent.d_name) 20184d9c625SLionel Sambuc */ 20284d9c625SLionel Sambuc #define WIN_MAXLEN 255 20384d9c625SLionel Sambuc 20484d9c625SLionel Sambuc /* Maximum size of a file on a FAT filesystem */ 20584d9c625SLionel Sambuc #define MSDOSFS_FILESIZE_MAX 0xFFFFFFFFLL 20684d9c625SLionel Sambuc 20784d9c625SLionel Sambuc /* 20884d9c625SLionel Sambuc * Transfer directory entries between internal and external form. 20984d9c625SLionel Sambuc * dep is a struct denode * (internal form), 21084d9c625SLionel Sambuc * dp is a struct direntry * (external form). 21184d9c625SLionel Sambuc */ 21284d9c625SLionel Sambuc #define DE_INTERNALIZE32(dep, dp) \ 21384d9c625SLionel Sambuc ((dep)->de_StartCluster |= getushort((dp)->deHighClust) << 16) 21484d9c625SLionel Sambuc #define DE_INTERNALIZE(dep, dp) \ 21584d9c625SLionel Sambuc (memcpy((dep)->de_Name, (dp)->deName, 11), \ 21684d9c625SLionel Sambuc (dep)->de_Attributes = (dp)->deAttributes, \ 21784d9c625SLionel Sambuc (dep)->de_CHun = (dp)->deCHundredth, \ 21884d9c625SLionel Sambuc (dep)->de_CTime = getushort((dp)->deCTime), \ 21984d9c625SLionel Sambuc (dep)->de_CDate = getushort((dp)->deCDate), \ 22084d9c625SLionel Sambuc (dep)->de_ADate = getushort((dp)->deADate), \ 22184d9c625SLionel Sambuc (dep)->de_MTime = getushort((dp)->deMTime), \ 22284d9c625SLionel Sambuc (dep)->de_MDate = getushort((dp)->deMDate), \ 22384d9c625SLionel Sambuc (dep)->de_StartCluster = getushort((dp)->deStartCluster), \ 22484d9c625SLionel Sambuc (dep)->de_FileSize = getulong((dp)->deFileSize), \ 22584d9c625SLionel Sambuc (FAT32((dep)->de_pmp) ? DE_INTERNALIZE32((dep), (dp)) : 0)) 22684d9c625SLionel Sambuc 22784d9c625SLionel Sambuc #define DE_EXTERNALIZE32(dp, dep) \ 22884d9c625SLionel Sambuc putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16) 22984d9c625SLionel Sambuc #define DE_EXTERNALIZE16(dp, dep) \ 23084d9c625SLionel Sambuc putushort((dp)->deHighClust, 0) 23184d9c625SLionel Sambuc #define DE_EXTERNALIZE(dp, dep) \ 23284d9c625SLionel Sambuc (memcpy((dp)->deName, (dep)->de_Name, 11), \ 23384d9c625SLionel Sambuc (dp)->deAttributes = (dep)->de_Attributes, \ 23484d9c625SLionel Sambuc (dp)->deCHundredth = (dep)->de_CHun, \ 23584d9c625SLionel Sambuc putushort((dp)->deCTime, (dep)->de_CTime), \ 23684d9c625SLionel Sambuc putushort((dp)->deCDate, (dep)->de_CDate), \ 23784d9c625SLionel Sambuc putushort((dp)->deADate, (dep)->de_ADate), \ 23884d9c625SLionel Sambuc putushort((dp)->deMTime, (dep)->de_MTime), \ 23984d9c625SLionel Sambuc putushort((dp)->deMDate, (dep)->de_MDate), \ 24084d9c625SLionel Sambuc putushort((dp)->deStartCluster, (dep)->de_StartCluster), \ 24184d9c625SLionel Sambuc putulong((dp)->deFileSize, \ 24284d9c625SLionel Sambuc ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ 24384d9c625SLionel Sambuc (FAT32((dep)->de_pmp) ? DE_EXTERNALIZE32((dp), (dep)) : DE_EXTERNALIZE16((dp), (dep)))) 24484d9c625SLionel Sambuc 24584d9c625SLionel Sambuc #define de_forw de_chain[0] 24684d9c625SLionel Sambuc #define de_back de_chain[1] 24784d9c625SLionel Sambuc 24884d9c625SLionel Sambuc #if defined(_KERNEL) || defined(MAKEFS) 24984d9c625SLionel Sambuc 25084d9c625SLionel Sambuc #define VTODE(vp) ((struct denode *)(vp)->v_data) 25184d9c625SLionel Sambuc #define DETOV(de) ((de)->de_vnode) 25284d9c625SLionel Sambuc 25384d9c625SLionel Sambuc #define DETIMES(dep, acc, mod, cre, gmtoff) \ 25484d9c625SLionel Sambuc while ((dep)->de_flag & (DE_UPDATE | DE_CREATE | DE_ACCESS)) \ 25584d9c625SLionel Sambuc msdosfs_detimes(dep, acc, mod, cre, gmtoff) 25684d9c625SLionel Sambuc 25784d9c625SLionel Sambuc /* 25884d9c625SLionel Sambuc * This overlays the fid structure (see fstypes.h) 25984d9c625SLionel Sambuc */ 26084d9c625SLionel Sambuc struct defid { 26184d9c625SLionel Sambuc u_int16_t defid_len; /* length of structure */ 26284d9c625SLionel Sambuc u_int16_t defid_pad; /* force 4-byte alignment */ 26384d9c625SLionel Sambuc 26484d9c625SLionel Sambuc u_int32_t defid_dirclust; /* cluster this dir entry came from */ 26584d9c625SLionel Sambuc u_int32_t defid_dirofs; /* offset of entry within the cluster */ 26684d9c625SLionel Sambuc u_int32_t defid_gen; /* generation number */ 26784d9c625SLionel Sambuc }; 26884d9c625SLionel Sambuc 26984d9c625SLionel Sambuc /* 27084d9c625SLionel Sambuc * Prototypes for MSDOSFS vnode operations 27184d9c625SLionel Sambuc */ 27284d9c625SLionel Sambuc int msdosfs_lookup (void *); 27384d9c625SLionel Sambuc int msdosfs_create (void *); 27484d9c625SLionel Sambuc int msdosfs_close (void *); 27584d9c625SLionel Sambuc int msdosfs_access (void *); 27684d9c625SLionel Sambuc int msdosfs_getattr (void *); 27784d9c625SLionel Sambuc int msdosfs_setattr (void *); 27884d9c625SLionel Sambuc int msdosfs_read (void *); 27984d9c625SLionel Sambuc int msdosfs_write (void *); 28084d9c625SLionel Sambuc #define msdosfs_lease_check genfs_lease_check 28184d9c625SLionel Sambuc #define msdosfs_ioctl genfs_enoioctl 28284d9c625SLionel Sambuc #define msdosfs_poll genfs_poll 28384d9c625SLionel Sambuc #define msdosfs_revoke genfs_revoke 28484d9c625SLionel Sambuc #define msdosfs_mmap genfs_mmap 28584d9c625SLionel Sambuc int msdosfs_fsync (void *); 28684d9c625SLionel Sambuc #define msdosfs_seek genfs_seek 28784d9c625SLionel Sambuc int msdosfs_remove (void *); 28884d9c625SLionel Sambuc int msdosfs_rename (void *); 28984d9c625SLionel Sambuc int msdosfs_mkdir (void *); 29084d9c625SLionel Sambuc int msdosfs_rmdir (void *); 29184d9c625SLionel Sambuc int msdosfs_readdir (void *); 29284d9c625SLionel Sambuc #define msdosfs_abortop genfs_abortop 29384d9c625SLionel Sambuc int msdosfs_inactive (void *); 29484d9c625SLionel Sambuc int msdosfs_reclaim (void *); 29584d9c625SLionel Sambuc int msdosfs_bmap (void *); 29684d9c625SLionel Sambuc int msdosfs_strategy (void *); 29784d9c625SLionel Sambuc int msdosfs_print (void *); 29884d9c625SLionel Sambuc int msdosfs_advlock (void *); 29984d9c625SLionel Sambuc int msdosfs_pathconf (void *); 30084d9c625SLionel Sambuc 30184d9c625SLionel Sambuc /* 30284d9c625SLionel Sambuc * Internal service routine prototypes. 30384d9c625SLionel Sambuc */ 30484d9c625SLionel Sambuc struct componentname; 30584d9c625SLionel Sambuc struct direntry; 30684d9c625SLionel Sambuc struct kauth_cred; 30784d9c625SLionel Sambuc int msdosfs_update(struct vnode *, const struct timespec *, 30884d9c625SLionel Sambuc const struct timespec *, int); 30984d9c625SLionel Sambuc int createde(struct denode *, struct denode *, 31084d9c625SLionel Sambuc struct denode **, struct componentname *); 31184d9c625SLionel Sambuc int deextend(struct denode *, u_long, struct kauth_cred *); 312*0a6a1f1dSLionel Sambuc #ifdef MAKEFS 31384d9c625SLionel Sambuc int deget(struct msdosfsmount *, u_long, u_long, struct denode **); 314*0a6a1f1dSLionel Sambuc #else 315*0a6a1f1dSLionel Sambuc int deget(struct msdosfsmount *, u_long, u_long, struct vnode **); 316*0a6a1f1dSLionel Sambuc #endif 31784d9c625SLionel Sambuc int detrunc(struct denode *, u_long, int, struct kauth_cred *); 31884d9c625SLionel Sambuc int deupdat(struct denode *, int); 31984d9c625SLionel Sambuc int doscheckpath(struct denode *, struct denode *); 32084d9c625SLionel Sambuc int dosdirempty(struct denode *); 32184d9c625SLionel Sambuc int readde(struct denode *, struct buf **, struct direntry **); 32284d9c625SLionel Sambuc int readep(struct msdosfsmount *, u_long, u_long, 32384d9c625SLionel Sambuc struct buf **, struct direntry **); 32484d9c625SLionel Sambuc int removede(struct denode *, struct denode *); 32584d9c625SLionel Sambuc int uniqdosname(struct denode *, struct componentname *, u_char *); 32684d9c625SLionel Sambuc int findwin95(struct denode *); 32784d9c625SLionel Sambuc int msdosfs_gop_alloc(struct vnode *, off_t, off_t, int, struct kauth_cred *); 32884d9c625SLionel Sambuc void msdosfs_gop_markupdate(struct vnode *, int); 32984d9c625SLionel Sambuc void msdosfs_detimes(struct denode *, const struct timespec *, 33084d9c625SLionel Sambuc const struct timespec *, const struct timespec *, int); 33184d9c625SLionel Sambuc int msdosfs_fh_enter(struct msdosfsmount *, uint32_t, uint32_t, uint32_t *); 33284d9c625SLionel Sambuc int msdosfs_fh_remove(struct msdosfsmount *, uint32_t, uint32_t); 33384d9c625SLionel Sambuc int msdosfs_fh_lookup(struct msdosfsmount *, uint32_t, uint32_t, uint32_t *); 33484d9c625SLionel Sambuc void msdosfs_fh_destroy(struct msdosfsmount *); 33584d9c625SLionel Sambuc #endif /* _KERNEL || MAKEFS */ 33684d9c625SLionel Sambuc #endif /* _MSDOSFS_DENODE_H_ */ 337