diff options
-rw-r--r-- | usr.sbin/makefs/ffs.c | 6 | ||||
-rw-r--r-- | usr.sbin/makefs/ffs/buf.c | 20 | ||||
-rw-r--r-- | usr.sbin/makefs/ffs/buf.h | 16 | ||||
-rw-r--r-- | usr.sbin/makefs/ffs/ffs_alloc.c | 8 | ||||
-rw-r--r-- | usr.sbin/makefs/ffs/ffs_balloc.c | 16 | ||||
-rw-r--r-- | usr.sbin/makefs/ffs/ffs_extern.h | 4 | ||||
-rw-r--r-- | usr.sbin/makefs/ffs/ufs_inode.h | 4 | ||||
-rw-r--r-- | usr.sbin/makefs/fs/msdosfs/denode.h | 28 | ||||
-rw-r--r-- | usr.sbin/makefs/fs/msdosfs/fat.h | 4 | ||||
-rw-r--r-- | usr.sbin/makefs/fs/msdosfs/msdosfs_conv.c | 3 | ||||
-rw-r--r-- | usr.sbin/makefs/fs/msdosfs/msdosfs_fat.c | 22 | ||||
-rw-r--r-- | usr.sbin/makefs/fs/msdosfs/msdosfs_lookup.c | 10 | ||||
-rw-r--r-- | usr.sbin/makefs/fs/msdosfs/msdosfsmount.h | 4 | ||||
-rw-r--r-- | usr.sbin/makefs/msdos.c | 4 | ||||
-rw-r--r-- | usr.sbin/makefs/msdos.h | 8 | ||||
-rw-r--r-- | usr.sbin/makefs/msdos/msdosfs_denode.c | 20 | ||||
-rw-r--r-- | usr.sbin/makefs/msdos/msdosfs_vfsops.c | 8 | ||||
-rw-r--r-- | usr.sbin/makefs/msdos/msdosfs_vnops.c | 24 | ||||
-rw-r--r-- | usr.sbin/makefs/ufs/ffs/ffs_extern.h | 6 |
19 files changed, 107 insertions, 108 deletions
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index e2ee71bc3af..ca456847021 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs.c,v 1.7 2016/10/16 22:26:34 tedu Exp $ */ +/* $OpenBSD: ffs.c,v 1.8 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $ */ /* @@ -845,9 +845,9 @@ ffs_write_file(union dinode *din, uint32_t ino, void *buf, fsinfo_t *fsopts) off_t bufleft, chunk, offset; ssize_t nread; struct inode in; - struct buf * bp; + struct mkfsbuf * bp; ffs_opt_t *ffs_opts = fsopts->fs_specific; - struct vnode vp = { fsopts, NULL }; + struct mkfsvnode vp = { fsopts, NULL }; assert (din != NULL); assert (buf != NULL); diff --git a/usr.sbin/makefs/ffs/buf.c b/usr.sbin/makefs/ffs/buf.c index 9289ffb3f02..68ba5eee585 100644 --- a/usr.sbin/makefs/ffs/buf.c +++ b/usr.sbin/makefs/ffs/buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.2 2016/10/16 20:26:56 natano Exp $ */ +/* $OpenBSD: buf.c,v 1.3 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: buf.c,v 1.24 2016/06/24 19:24:11 christos Exp $ */ /* @@ -49,11 +49,11 @@ #include "makefs.h" #include "buf.h" -TAILQ_HEAD(buftailhead,buf) buftail; +TAILQ_HEAD(buftailhead,mkfsbuf) buftail; int -bread(struct vnode *vp, daddr_t blkno, int size, int u2 __unused, - struct buf **bpp) +bread(struct mkfsvnode *vp, daddr_t blkno, int size, int u2 __unused, + struct mkfsbuf **bpp) { off_t offset; ssize_t rv; @@ -87,7 +87,7 @@ bread(struct vnode *vp, daddr_t blkno, int size, int u2 __unused, } void -brelse(struct buf *bp, int u1 __unused) +brelse(struct mkfsbuf *bp, int u1 __unused) { assert (bp != NULL); @@ -117,7 +117,7 @@ brelse(struct buf *bp, int u1 __unused) } int -bwrite(struct buf *bp) +bwrite(struct mkfsbuf *bp) { off_t offset; ssize_t rv; @@ -148,7 +148,7 @@ bwrite(struct buf *bp) void bcleanup(void) { - struct buf *bp; + struct mkfsbuf *bp; /* * XXX this really shouldn't be necessary, but i'm curious to @@ -168,12 +168,12 @@ bcleanup(void) printf("bcleanup: done\n"); } -struct buf * -getblk(struct vnode *vp, daddr_t blkno, int size, int u1 __unused, +struct mkfsbuf * +getblk(struct mkfsvnode *vp, daddr_t blkno, int size, int u1 __unused, int u2 __unused) { static int buftailinitted; - struct buf *bp; + struct mkfsbuf *bp; void *n; if (debug & DEBUG_BUF_GETBLK) diff --git a/usr.sbin/makefs/ffs/buf.h b/usr.sbin/makefs/ffs/buf.h index 7ae3da42a02..4107d61fc97 100644 --- a/usr.sbin/makefs/ffs/buf.h +++ b/usr.sbin/makefs/ffs/buf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.h,v 1.3 2016/10/16 22:33:46 tedu Exp $ */ +/* $OpenBSD: buf.h,v 1.4 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: buf.h,v 1.10 2015/03/29 05:52:59 agc Exp $ */ /* @@ -56,14 +56,14 @@ struct componentname { }; struct makefs_fsinfo; -struct vnode { +struct mkfsvnode { struct makefs_fsinfo *fs; void *v_data; }; #define vput(a) ((void)(a)) -struct buf { +struct mkfsbuf { void * b_data; long b_bufsize; long b_bcount; @@ -71,14 +71,14 @@ struct buf { daddr_t b_lblkno; struct makefs_fsinfo * b_fs; - TAILQ_ENTRY(buf) b_tailq; + TAILQ_ENTRY(mkfsbuf) b_tailq; }; void bcleanup(void); -int bread(struct vnode *, daddr_t, int, int, struct buf **); -void brelse(struct buf *, int); -int bwrite(struct buf *); -struct buf * getblk(struct vnode *, daddr_t, int, int, int); +int bread(struct mkfsvnode *, daddr_t, int, int, struct mkfsbuf **); +void brelse(struct mkfsbuf *, int); +int bwrite(struct mkfsbuf *); +struct mkfsbuf * getblk(struct mkfsvnode *, daddr_t, int, int, int); #define bdwrite(bp) bwrite(bp) #define clrbuf(bp) memset((bp)->b_data, 0, (u_int)(bp)->b_bcount) diff --git a/usr.sbin/makefs/ffs/ffs_alloc.c b/usr.sbin/makefs/ffs/ffs_alloc.c index 3b10a4df168..cdff6ae5c2b 100644 --- a/usr.sbin/makefs/ffs/ffs_alloc.c +++ b/usr.sbin/makefs/ffs/ffs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_alloc.c,v 1.6 2016/10/16 22:26:34 tedu Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.7 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.29 2016/06/24 19:24:11 christos Exp $ */ /* From: NetBSD: ffs_alloc.c,v 1.50 2001/09/06 02:16:01 lukem Exp */ @@ -58,7 +58,7 @@ static int scanc(u_int, const u_char *, const u_char *, int); static daddr_t ffs_alloccg(struct inode *, int, daddr_t, int); -static daddr_t ffs_alloccgblk(struct inode *, struct buf *, daddr_t); +static daddr_t ffs_alloccgblk(struct inode *, struct mkfsbuf *, daddr_t); static daddr_t ffs_hashalloc(struct inode *, int, daddr_t, int, daddr_t (*)(struct inode *, int, daddr_t, int)); static int32_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int); @@ -288,7 +288,7 @@ static daddr_t ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) { struct cg *cgp; - struct buf *bp; + struct mkfsbuf *bp; daddr_t bno, blkno; int error, frags, allocsiz, i; struct fs *fs = ip->i_fs; @@ -369,7 +369,7 @@ ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) * blocks may be fragmented by the routine that allocates them. */ static daddr_t -ffs_alloccgblk(struct inode *ip, struct buf *bp, daddr_t bpref) +ffs_alloccgblk(struct inode *ip, struct mkfsbuf *bp, daddr_t bpref) { struct cg *cgp; daddr_t blkno; diff --git a/usr.sbin/makefs/ffs/ffs_balloc.c b/usr.sbin/makefs/ffs/ffs_balloc.c index 6bdcd5a812e..15b143026aa 100644 --- a/usr.sbin/makefs/ffs/ffs_balloc.c +++ b/usr.sbin/makefs/ffs/ffs_balloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_balloc.c,v 1.4 2016/10/16 22:19:10 tedu Exp $ */ +/* $OpenBSD: ffs_balloc.c,v 1.5 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: ffs_balloc.c,v 1.21 2015/03/29 05:52:59 agc Exp $ */ /* From NetBSD: ffs_balloc.c,v 1.25 2001/08/08 08:36:36 lukem Exp */ @@ -46,8 +46,8 @@ #include "ffs/ufs_inode.h" #include "ffs/ffs_extern.h" -static int ffs_balloc_ufs1(struct inode *, off_t, int, struct buf **); -static int ffs_balloc_ufs2(struct inode *, off_t, int, struct buf **); +static int ffs_balloc_ufs1(struct inode *, off_t, int, struct mkfsbuf **); +static int ffs_balloc_ufs2(struct inode *, off_t, int, struct mkfsbuf **); /* * Balloc defines the structure of file system storage @@ -58,7 +58,7 @@ static int ffs_balloc_ufs2(struct inode *, off_t, int, struct buf **); */ int -ffs_balloc(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) +ffs_balloc(struct inode *ip, off_t offset, int bufsize, struct mkfsbuf **bpp) { if (ip->i_fs->fs_magic == FS_UFS2_MAGIC) return ffs_balloc_ufs2(ip, offset, bufsize, bpp); @@ -67,12 +67,12 @@ ffs_balloc(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } static int -ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) +ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct mkfsbuf **bpp) { daddr_t lbn, lastlbn; int size; int32_t nb; - struct buf *bp, *nbp; + struct mkfsbuf *bp, *nbp; struct fs *fs = ip->i_fs; struct indir indirs[UFS_NIADDR + 2]; daddr_t newb, pref; @@ -317,11 +317,11 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } static int -ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) +ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct mkfsbuf **bpp) { daddr_t lbn, lastlbn; int size; - struct buf *bp, *nbp; + struct mkfsbuf *bp, *nbp; struct fs *fs = ip->i_fs; struct indir indirs[UFS_NIADDR + 2]; daddr_t newb, pref, nb; diff --git a/usr.sbin/makefs/ffs/ffs_extern.h b/usr.sbin/makefs/ffs/ffs_extern.h index b4858ca3ad0..423cd6bc63a 100644 --- a/usr.sbin/makefs/ffs/ffs_extern.h +++ b/usr.sbin/makefs/ffs/ffs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_extern.h,v 1.3 2016/10/16 20:26:56 natano Exp $ */ +/* $OpenBSD: ffs_extern.h,v 1.4 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: ffs_extern.h,v 1.6 2003/08/07 11:25:33 agc Exp $ */ /* From: NetBSD: ffs_extern.h,v 1.19 2001/08/17 02:18:48 lukem Exp */ @@ -56,7 +56,7 @@ daddr_t ffs_blkpref_ufs2(struct inode *, daddr_t, int, int64_t *); void ffs_clusteracct(struct fs *, struct cg *, int32_t, int); /* ffs_balloc.c */ -int ffs_balloc(struct inode *, off_t, int, struct buf **); +int ffs_balloc(struct inode *, off_t, int, struct mkfsbuf **); /* ffs_bswap.c */ void ffs_sb_swap(struct fs*, struct fs *); diff --git a/usr.sbin/makefs/ffs/ufs_inode.h b/usr.sbin/makefs/ffs/ufs_inode.h index 9478d87a9d2..57455f927b4 100644 --- a/usr.sbin/makefs/ffs/ufs_inode.h +++ b/usr.sbin/makefs/ffs/ufs_inode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_inode.h,v 1.2 2016/10/16 20:26:56 natano Exp $ */ +/* $OpenBSD: ufs_inode.h,v 1.3 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: ufs_inode.h,v 1.5 2013/01/30 19:19:19 christos Exp $ */ /* From: NetBSD: inode.h,v 1.27 2001/12/18 10:57:23 fvdl Exp $ */ @@ -45,7 +45,7 @@ union dinode { struct inode { ino_t i_number; /* The identity of the inode. */ - struct vnode *i_devvp; /* device vnode for block I/O */ + struct mkfsvnode *i_devvp; /* device mkfsvnode for block I/O */ struct fs *i_fs; /* File system */ union dinode i_din; uint64_t i_size; diff --git a/usr.sbin/makefs/fs/msdosfs/denode.h b/usr.sbin/makefs/fs/msdosfs/denode.h index c95c19f7561..57612a62ad2 100644 --- a/usr.sbin/makefs/fs/msdosfs/denode.h +++ b/usr.sbin/makefs/fs/msdosfs/denode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: denode.h,v 1.5 2016/10/16 22:33:46 tedu Exp $ */ +/* $OpenBSD: denode.h,v 1.6 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: denode.h,v 1.24 2014/07/08 09:21:52 hannken Exp $ */ /*- @@ -52,12 +52,12 @@ struct genfs_node { }; -struct vnode; +struct mkfsvnode; struct msdosfsmount; -struct buf; +struct mkfsbuf; /* - * This is the pc filesystem specific portion of the vnode structure. + * This is the pc filesystem specific portion of the mkfsvnode structure. * * To describe a file uniquely the de_dirclust, de_diroffset, and * de_StartCluster fields are used. @@ -148,7 +148,7 @@ struct fatcache { /* * This is the in memory variant of a dos directory entry. It is usually - * contained within a vnode. + * contained within a mkfsvnode. */ struct denode_key { u_long dk_dirclust; /* cluster of the directory file containing this entry */ @@ -157,8 +157,8 @@ struct denode_key { }; struct denode { struct genfs_node de_gnode; - struct vnode *de_vnode; /* addr of vnode we are part of */ - struct vnode *de_devvp; /* vnode of blk dev we live on */ + struct mkfsvnode *de_mkfsvnode; /* addr of mkfsvnode we are part of */ + struct mkfsvnode *de_devvp; /* mkfsvnode of blk dev we live on */ u_long de_flag; /* flag bits */ dev_t de_dev; /* device where direntry lives */ struct denode_key de_key; @@ -244,7 +244,7 @@ struct denode { #define VTODE(vp) ((struct denode *)(vp)->v_data) -#define DETOV(de) ((de)->de_vnode) +#define DETOV(de) ((de)->de_mkfsvnode) #define DETIMES(dep, acc, mod, cre, gmtoff) \ while ((dep)->de_flag & (DE_UPDATE | DE_CREATE | DE_ACCESS)) \ @@ -263,7 +263,7 @@ struct defid { }; /* - * Prototypes for MSDOSFS vnode operations + * Prototypes for MSDOSFS mkfsvnode operations */ int msdosfs_lookup (void *); int msdosfs_create (void *); @@ -299,7 +299,7 @@ int msdosfs_pathconf (void *); */ struct componentname; struct direntry; -int msdosfs_update(struct vnode *, const struct timespec *, +int msdosfs_update(struct mkfsvnode *, const struct timespec *, const struct timespec *, int); int createde(struct denode *, struct denode *, struct denode **, struct componentname *); @@ -307,12 +307,12 @@ int deextend(struct denode *, u_long); int deget(struct msdosfsmount *, u_long, u_long, struct denode **); int detrunc(struct denode *, u_long, int); int deupdat(struct denode *, int); -int readde(struct denode *, struct buf **, struct direntry **); +int readde(struct denode *, struct mkfsbuf **, struct direntry **); int readep(struct msdosfsmount *, u_long, u_long, - struct buf **, struct direntry **); + struct mkfsbuf **, struct direntry **); int uniqdosname(struct denode *, struct componentname *, u_char *); -int msdosfs_gop_alloc(struct vnode *, off_t, off_t, int); -void msdosfs_gop_markupdate(struct vnode *, int); +int msdosfs_gop_alloc(struct mkfsvnode *, off_t, off_t, int); +void msdosfs_gop_markupdate(struct mkfsvnode *, int); void msdosfs_detimes(struct denode *, const struct timespec *, const struct timespec *, const struct timespec *, int); int msdosfs_fh_enter(struct msdosfsmount *, uint32_t, uint32_t, uint32_t *); diff --git a/usr.sbin/makefs/fs/msdosfs/fat.h b/usr.sbin/makefs/fs/msdosfs/fat.h index 1a128cd409b..75a83367504 100644 --- a/usr.sbin/makefs/fs/msdosfs/fat.h +++ b/usr.sbin/makefs/fs/msdosfs/fat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fat.h,v 1.3 2016/10/16 21:35:27 tedu Exp $ */ +/* $OpenBSD: fat.h,v 1.4 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: fat.h,v 1.9 2014/10/18 08:33:28 snj Exp $ */ /*- @@ -104,7 +104,7 @@ int pcbmap(struct denode *, u_long, daddr_t *, u_long *, int *); int clusterfree(struct msdosfsmount *, u_long, u_long *); int clusteralloc(struct msdosfsmount *, u_long, u_long,u_long *,u_long *); -int extendfile(struct denode *, u_long, struct buf **, u_long *, int); +int extendfile(struct denode *, u_long, struct mkfsbuf **, u_long *, int); int fatentry(int, struct msdosfsmount *, u_long, u_long *, u_long); void fc_purge(struct denode *, u_int); void fc_lookup(struct denode *, u_long, u_long *, u_long *); diff --git a/usr.sbin/makefs/fs/msdosfs/msdosfs_conv.c b/usr.sbin/makefs/fs/msdosfs/msdosfs_conv.c index 788fafd181d..d606b6e73b4 100644 --- a/usr.sbin/makefs/fs/msdosfs/msdosfs_conv.c +++ b/usr.sbin/makefs/fs/msdosfs/msdosfs_conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_conv.c,v 1.2 2016/10/16 18:55:10 natano Exp $ */ +/* $OpenBSD: msdosfs_conv.c,v 1.3 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.24 1997/10/17 11:23:54 ws Exp $ */ /*- @@ -54,7 +54,6 @@ #include <sys/param.h> #include <sys/time.h> #include <sys/dirent.h> -#include <sys/vnode.h> #include <sys/lock.h> /* diff --git a/usr.sbin/makefs/fs/msdosfs/msdosfs_fat.c b/usr.sbin/makefs/fs/msdosfs/msdosfs_fat.c index 9d0ec3093d0..a68d2905ed1 100644 --- a/usr.sbin/makefs/fs/msdosfs/msdosfs_fat.c +++ b/usr.sbin/makefs/fs/msdosfs/msdosfs_fat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_fat.c,v 1.2 2016/10/16 20:26:56 natano Exp $ */ +/* $OpenBSD: msdosfs_fat.c,v 1.3 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdosfs_fat.c,v 1.31 2016/05/07 16:43:02 mlelstv Exp $ */ /*- @@ -112,7 +112,7 @@ print_fat_stats(void) static void fatblock(struct msdosfsmount *, u_long, u_long *, u_long *, u_long *); -void updatefats(struct msdosfsmount *, struct buf *, u_long); +void updatefats(struct msdosfsmount *, struct mkfsbuf *, u_long); static inline void usemap_free(struct msdosfsmount *, u_long); static inline void usemap_alloc(struct msdosfsmount *, u_long); static int fatchain(struct msdosfsmount *, u_long, u_long, u_long); @@ -174,7 +174,7 @@ pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp, u_long *cnp, int *sp) u_long byteoffset; u_long bn; u_long bo; - struct buf *bp = NULL; + struct mkfsbuf *bp = NULL; u_long bp_bn = -1; struct msdosfsmount *pmp = dep->de_pmp; u_long bsize; @@ -376,10 +376,10 @@ fc_purge(struct denode *dep, u_int frcn) * fatbn - block number relative to begin of filesystem of the modified FAT block. */ void -updatefats(struct msdosfsmount *pmp, struct buf *bp, u_long fatbn) +updatefats(struct msdosfsmount *pmp, struct mkfsbuf *bp, u_long fatbn) { int i, error; - struct buf *bpn; + struct mkfsbuf *bpn; DPRINTF(("%s(pmp %p, bp %p, fatbn %lu)\n", __func__, pmp, bp, fatbn)); @@ -550,7 +550,7 @@ fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, int error; u_long readcn; u_long bn, bo, bsize, byteoffset; - struct buf *bp; + struct mkfsbuf *bp; DPRINTF(("%s(func %d, pmp %p, clust %lu, oldcon %p, newcon " "%lx)\n", __func__, function, pmp, cn, oldcontents, newcontents)); @@ -648,7 +648,7 @@ fatchain(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith) { int error; u_long bn, bo, bsize, byteoffset, readcn, newc; - struct buf *bp; + struct mkfsbuf *bp; DPRINTF(("%s(pmp %p, start %lu, count %lu, fillwith %lx)\n", __func__, pmp, start, count, fillwith)); @@ -873,7 +873,7 @@ int freeclusterchain(struct msdosfsmount *pmp, u_long cluster) { int error; - struct buf *bp = NULL; + struct mkfsbuf *bp = NULL; u_long bn, bo, bsize, byteoffset; u_long readcn, lbn = -1; @@ -930,7 +930,7 @@ freeclusterchain(struct msdosfsmount *pmp, u_long cluster) int fillinusemap(struct msdosfsmount *pmp) { - struct buf *bp = NULL; + struct mkfsbuf *bp = NULL; u_long cn, readcn; int error; u_long bn, bo, bsize, byteoffset; @@ -995,12 +995,12 @@ fillinusemap(struct msdosfsmount *pmp) */ int -extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, int flags) +extendfile(struct denode *dep, u_long count, struct mkfsbuf **bpp, u_long *ncp, int flags) { int error; u_long frcn = 0, cn, got; struct msdosfsmount *pmp = dep->de_pmp; - struct buf *bp; + struct mkfsbuf *bp; /* * Don't try to extend the root directory diff --git a/usr.sbin/makefs/fs/msdosfs/msdosfs_lookup.c b/usr.sbin/makefs/fs/msdosfs/msdosfs_lookup.c index cc5ca09b560..1aa64fb8394 100644 --- a/usr.sbin/makefs/fs/msdosfs/msdosfs_lookup.c +++ b/usr.sbin/makefs/fs/msdosfs/msdosfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_lookup.c,v 1.5 2016/10/16 22:33:46 tedu Exp $ */ +/* $OpenBSD: msdosfs_lookup.c,v 1.6 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.35 2016/01/30 09:59:27 mlelstv Exp $ */ /*- @@ -75,7 +75,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, struct c u_long fndoffset, havecnt = 0, wcnt = 1, i; struct direntry *ndep; struct msdosfsmount *pmp = ddep->de_pmp; - struct buf *bp; + struct mkfsbuf *bp; daddr_t bn; int blsize; #define async 0 @@ -266,7 +266,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, struct c * directory entry within the block. */ int -readep(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, struct buf **bpp, struct direntry **epp) +readep(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, struct mkfsbuf **bpp, struct direntry **epp) { int error; daddr_t bn; @@ -293,7 +293,7 @@ readep(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, struct buf * * entry within the block. */ int -readde(struct denode *dep, struct buf **bpp, struct direntry **epp) +readde(struct denode *dep, struct mkfsbuf **bpp, struct direntry **epp) { return (readep(dep->de_pmp, dep->de_dirclust, dep->de_diroffset, bpp, epp)); @@ -311,7 +311,7 @@ uniqdosname(struct denode *dep, struct componentname *cnp, u_char *cp) int blsize; u_long cn; daddr_t bn; - struct buf *bp; + struct mkfsbuf *bp; int error; for (gen = 1;; gen++) { diff --git a/usr.sbin/makefs/fs/msdosfs/msdosfsmount.h b/usr.sbin/makefs/fs/msdosfs/msdosfsmount.h index e3eea919059..5c79a1e47ee 100644 --- a/usr.sbin/makefs/fs/msdosfs/msdosfsmount.h +++ b/usr.sbin/makefs/fs/msdosfs/msdosfsmount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfsmount.h,v 1.4 2016/10/16 21:35:27 tedu Exp $ */ +/* $OpenBSD: msdosfsmount.h,v 1.5 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.21 2016/01/30 09:59:27 mlelstv Exp $ */ /*- @@ -83,7 +83,7 @@ struct msdosfsmount { mode_t pm_dirmask; /* mask to and with file protection bits for directories */ int pm_minuteswest; /* of Greenwitch */ - struct vnode *pm_devvp; /* vnode for block device mntd */ + struct mkfsvnode *pm_devvp; /* mkfsvnode for block device mntd */ struct bpb50 pm_bpb; /* BIOS parameter blk for this fs */ u_long pm_FATsecs; /* actual number of FAT sectors */ u_long pm_fatblk; /* sector # of first FAT */ diff --git a/usr.sbin/makefs/msdos.c b/usr.sbin/makefs/msdos.c index c059a1b43a5..096cdfb0daf 100644 --- a/usr.sbin/makefs/msdos.c +++ b/usr.sbin/makefs/msdos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdos.c,v 1.4 2016/10/16 20:26:56 natano Exp $ */ +/* $OpenBSD: msdos.c,v 1.5 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdos.c,v 1.16 2016/01/30 09:59:27 mlelstv Exp $ */ /*- @@ -116,7 +116,7 @@ void msdos_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts) { struct msdos_options *msdos_opt = fsopts->fs_specific; - struct vnode vp, rootvp; + struct mkfsvnode vp, rootvp; struct timeval start; struct msdosfsmount *pmp; diff --git a/usr.sbin/makefs/msdos.h b/usr.sbin/makefs/msdos.h index 796777af22d..68960ae83c2 100644 --- a/usr.sbin/makefs/msdos.h +++ b/usr.sbin/makefs/msdos.h @@ -1,4 +1,4 @@ -/* $OpenBSD: msdos.h,v 1.2 2016/10/16 20:26:56 natano Exp $ */ +/* $OpenBSD: msdos.h,v 1.3 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdos.h,v 1.3 2015/10/16 16:40:02 christos Exp $ */ /*- @@ -30,11 +30,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ -struct vnode; +struct mkfsvnode; struct denode; -struct msdosfsmount *msdosfs_mount(struct vnode *, int); -int msdosfs_root(struct msdosfsmount *, struct vnode *); +struct msdosfsmount *msdosfs_mount(struct mkfsvnode *, int); +int msdosfs_root(struct msdosfsmount *, struct mkfsvnode *); struct denode *msdosfs_mkfile(const char *, struct denode *, fsnode *); struct denode *msdosfs_mkdire(const char *, struct denode *, fsnode *); diff --git a/usr.sbin/makefs/msdos/msdosfs_denode.c b/usr.sbin/makefs/msdos/msdosfs_denode.c index 655db20b79e..b57e812b452 100644 --- a/usr.sbin/makefs/msdos/msdosfs_denode.c +++ b/usr.sbin/makefs/msdos/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.3 2016/10/16 22:33:46 tedu Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.4 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.7 2015/03/29 05:52:59 agc Exp $ */ /*- @@ -85,7 +85,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, int error; struct direntry *direntptr; struct denode *ldep; - struct buf *bp; + struct mkfsbuf *bp; #ifdef MSDOSFS_DEBUG printf("deget(pmp %p, dirclust %lu, diroffset %lx, depp %p)\n", @@ -100,7 +100,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, dirclust = pmp->pm_rootdirblk; ldep = ecalloc(1, sizeof(*ldep)); - ldep->de_vnode = NULL; + ldep->de_mkfsvnode = NULL; ldep->de_flag = 0; ldep->de_devvp = 0; ldep->de_lockf = 0; @@ -112,7 +112,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, ldep->de_refcnt = 1; fc_purge(ldep, 0); /* - * Copy the directory entry into the denode area of the vnode. + * Copy the directory entry into the denode area of the mkfsvnode. */ if ((dirclust == MSDOSFSROOT || (FAT32(pmp) && dirclust == pmp->pm_rootdirblk)) @@ -124,7 +124,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, * exists), and then use the time and date from that entry * as the time and date for the root denode. */ - ldep->de_vnode = (struct vnode *)-1; + ldep->de_mkfsvnode = (struct mkfsvnode *)-1; ldep->de_Attributes = ATTR_DIRECTORY; if (FAT32(pmp)) @@ -160,7 +160,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, } /* - * Fill in a few fields of the vnode and finish filling in the + * Fill in a few fields of the mkfsvnode and finish filling in the * denode. Then return the address of the found denode. */ if (ldep->de_Attributes & ATTR_DIRECTORY) { @@ -198,7 +198,7 @@ detrunc(struct denode *dep, u_long length, int flags) daddr_t bn, lastblock; int boff; int isadir = dep->de_Attributes & ATTR_DIRECTORY; - struct buf *bp; + struct mkfsbuf *bp; struct msdosfsmount *pmp = dep->de_pmp; #ifdef MSDOSFS_DEBUG @@ -208,12 +208,12 @@ detrunc(struct denode *dep, u_long length, int flags) /* * Disallow attempts to truncate the root directory since it is of * fixed size. That's just the way dos filesystems are. We use - * the VROOT bit in the vnode because checking for the directory + * the VROOT bit in the mkfsvnode because checking for the directory * bit and a startcluster of 0 in the denode is not adequate to * recognize the root directory at this point in a file or * directory's life. */ - if (dep->de_vnode != NULL && !FAT32(pmp)) { + if (dep->de_mkfsvnode != NULL && !FAT32(pmp)) { printf("detrunc(): can't truncate root directory, clust %ld, offset %ld\n", dep->de_dirclust, dep->de_diroffset); return (EINVAL); @@ -321,7 +321,7 @@ deextend(struct denode *dep, u_long length) /* * The root of a DOS filesystem cannot be extended. */ - if (dep->de_vnode != NULL && !FAT32(pmp)) + if (dep->de_mkfsvnode != NULL && !FAT32(pmp)) return EINVAL; /* diff --git a/usr.sbin/makefs/msdos/msdosfs_vfsops.c b/usr.sbin/makefs/msdos/msdosfs_vfsops.c index 4a2fa572174..25c128a1c97 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vfsops.c,v 1.4 2016/10/16 21:35:27 tedu Exp $ */ +/* $OpenBSD: msdosfs_vfsops.c,v 1.5 2016/10/17 01:16:22 tedu Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -76,10 +76,10 @@ #endif struct msdosfsmount * -msdosfs_mount(struct vnode *devvp, int flags) +msdosfs_mount(struct mkfsvnode *devvp, int flags) { struct msdosfsmount *pmp = NULL; - struct buf *bp; + struct mkfsbuf *bp; union bootsector *bsp; struct byte_bpb33 *b33; struct byte_bpb50 *b50; @@ -360,7 +360,7 @@ error_exit: } int -msdosfs_root(struct msdosfsmount *pmp, struct vnode *vp) { +msdosfs_root(struct msdosfsmount *pmp, struct mkfsvnode *vp) { struct denode *ndep; int error; diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index cb6eb488a55..e7536e9cb59 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.4 2016/10/16 22:33:46 tedu Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.5 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.17 2016/01/30 09:59:27 mlelstv Exp $ */ /*- @@ -73,18 +73,18 @@ * Some general notes: * * In the ufs filesystem the inodes, superblocks, and indirect blocks are - * read/written using the vnode for the filesystem. Blocks that represent - * the contents of a file are read/written using the vnode for the file + * read/written using the mkfsvnode for the filesystem. Blocks that represent + * the contents of a file are read/written using the mkfsvnode for the file * (including directories when they are read/written as files). This * presents problems for the dos filesystem because data that should be in * an inode (if dos had them) resides in the directory itself. Since we - * must update directory entries without the benefit of having the vnode - * for the directory we must use the vnode for the filesystem. This means + * must update directory entries without the benefit of having the mkfsvnode + * for the directory we must use the mkfsvnode for the filesystem. This means * that when a directory is actually read/written (via read, write, or - * readdir, or seek) we must use the vnode for the filesystem instead of - * the vnode for the directory as would happen in ufs. This is to insure we + * readdir, or seek) we must use the mkfsvnode for the filesystem instead of + * the mkfsvnode for the directory as would happen in ufs. This is to insure we * retrieve the correct block from the buffer cache since the hash value is - * based upon the vnode address and the desired block number. + * based upon the mkfsvnode address and the desired block number. */ static int msdosfs_wfile(const char *, struct denode *, fsnode *); @@ -127,7 +127,7 @@ msdosfs_findslot(struct denode *dp, struct componentname *cnp) u_int diroff; int blsize; struct msdosfsmount *pmp; - struct buf *bp = 0; + struct mkfsbuf *bp = 0; struct direntry *dep; u_char dosfilename[12]; int wincnt = 1; @@ -383,7 +383,7 @@ bad: static int msdosfs_updatede(struct denode *dep) { - struct buf *bp; + struct mkfsbuf *bp; struct direntry *dirp; int error; @@ -407,7 +407,7 @@ msdosfs_wfile(const char *path, struct denode *dep, fsnode *node) struct stat *st = &node->inode->st; size_t nsize, offs; struct msdosfsmount *pmp = dep->de_pmp; - struct buf *bp; + struct mkfsbuf *bp; char *dat; u_long cn = 0; @@ -525,7 +525,7 @@ msdosfs_mkdire(const char *path, struct denode *pdep, fsnode *node) { u_long newcluster, pcl, bn; daddr_t lbn; struct direntry *denp; - struct buf *bp; + struct mkfsbuf *bp; cn.cn_nameptr = node->name; cn.cn_namelen = strlen(node->name); diff --git a/usr.sbin/makefs/ufs/ffs/ffs_extern.h b/usr.sbin/makefs/ufs/ffs/ffs_extern.h index 7fb06397b28..dd7b5697c99 100644 --- a/usr.sbin/makefs/ufs/ffs/ffs_extern.h +++ b/usr.sbin/makefs/ufs/ffs/ffs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_extern.h,v 1.3 2016/10/16 20:26:56 natano Exp $ */ +/* $OpenBSD: ffs_extern.h,v 1.4 2016/10/17 01:16:22 tedu Exp $ */ /* $NetBSD: ffs_extern.h,v 1.83 2016/10/01 13:15:45 jdolecek Exp $ */ /*- @@ -46,7 +46,7 @@ #define FFS_EXTATTR_AUTOCREATE 6 /* size for backing file autocreation */ #define FFS_MAXID 7 /* number of valid ffs ids */ -struct buf; +struct mkfsbuf; struct fid; struct fs; struct inode; @@ -60,7 +60,7 @@ struct timeval; struct timespec; struct ufsmount; struct uio; -struct vnode; +struct mkfsvnode; struct mbuf; struct cg; |