From 67ad9090d37d9e7d764e6f16965195271e838148 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 3 Apr 2006 01:58:49 +0000 Subject: [PATCH] A number of structures related to UFS and QUOTAS have changed name. dinode -> ufs1_dinode dqblk -> ufs_dqblk (and other quota related structures) --- bin/df/df.c | 6 ++++-- include/protocols/dumprestore.h | 4 ++-- lib/libstand/ufs.c | 8 ++++---- sbin/badsect/badsect.c | 4 ++-- sbin/clri/clri.c | 6 +++--- sbin/disklabel/disklabel.c | 5 ++++- sbin/dump/dump.h | 12 ++++++------ sbin/dump/itime.c | 10 ++-------- sbin/dump/main.c | 4 ++-- sbin/dump/traverse.c | 18 +++++++++--------- sbin/dumpfs/dumpfs.c | 3 ++- sbin/ffsinfo/ffsinfo.c | 12 ++++++------ sbin/fsck/dir.c | 18 +++++++++--------- sbin/fsck/fsck.h | 16 ++++++++-------- sbin/fsck/inode.c | 32 ++++++++++++++++---------------- sbin/fsck/pass1.c | 4 ++-- sbin/fsck/pass1b.c | 4 ++-- sbin/fsck/pass2.c | 10 +++++----- sbin/fsck/pass4.c | 4 ++-- sbin/fsck/utilities.c | 4 ++-- sbin/fsdb/fsdb.c | 6 +++--- sbin/fsdb/fsdb.h | 6 +++--- sbin/fsdb/fsdbutil.c | 8 ++++---- sbin/fsirand/fsirand.c | 8 ++++---- sbin/growfs/debug.c | 4 ++-- sbin/growfs/debug.h | 4 ++-- sbin/growfs/growfs.c | 16 ++++++++-------- sbin/newfs/mkfs.c | 20 ++++++++++---------- sbin/quotacheck/quotacheck.c | 28 ++++++++++++++-------------- sbin/restore/dirs.c | 8 ++++---- sbin/restore/restore.h | 4 ++-- sbin/tunefs/tunefs.c | 3 ++- usr.sbin/edquota/edquota.c | 20 ++++++++++---------- usr.sbin/quot/quot.c | 30 ++++++++++++++++-------------- usr.sbin/repquota/repquota.c | 10 +++++----- 35 files changed, 181 insertions(+), 178 deletions(-) diff --git a/bin/df/df.c b/bin/df/df.c index 3b5af67eee..f9ff5ccfac 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -38,7 +38,7 @@ * @(#) Copyright (c) 1980, 1990, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)df.c 8.9 (Berkeley) 5/8/95 * $FreeBSD: src/bin/df/df.c,v 1.23.2.9 2002/07/01 00:14:24 iedowse Exp $ - * $DragonFly: src/bin/df/df.c,v 1.7 2006/01/12 13:43:10 corecode Exp $ + * $DragonFly: src/bin/df/df.c,v 1.8 2006/04/03 01:58:43 dillon Exp $ */ #include @@ -46,8 +46,10 @@ #include #include #include -#include + +#include #include +#include #include #include diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h index 5478fde066..a32265a5cf 100644 --- a/include/protocols/dumprestore.h +++ b/include/protocols/dumprestore.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)dumprestore.h 8.2 (Berkeley) 1/21/94 - * $DragonFly: src/include/protocols/dumprestore.h,v 1.2 2005/12/30 17:54:30 dillon Exp $ + * $DragonFly: src/include/protocols/dumprestore.h,v 1.3 2006/04/03 01:58:44 dillon Exp $ */ #ifndef _PROTOCOLS_DUMPRESTORE_H_ @@ -76,7 +76,7 @@ union u_spcl { u_int32_t c_inumber; /* number of inode */ int32_t c_magic; /* magic number (see above) */ int32_t c_checksum; /* record checksum */ - struct dinode c_dinode; /* ownership and mode of inode */ + struct ufs1_dinode c_dinode; /* ownership and mode of inode */ int32_t c_count; /* number of valid c_addr entries */ char c_addr[TP_NINDIR]; /* 1 => data; 0 => hole in inode */ char c_label[LBLSIZE]; /* dump label */ diff --git a/lib/libstand/ufs.c b/lib/libstand/ufs.c index 3e9f41034e..9b75cc1739 100644 --- a/lib/libstand/ufs.c +++ b/lib/libstand/ufs.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/lib/libstand/ufs.c,v 1.5.6.1 2000/05/04 13:47:53 ps Exp $ */ -/* $DragonFly: src/lib/libstand/ufs.c,v 1.8 2006/03/24 18:35:22 dillon Exp $ */ +/* $DragonFly: src/lib/libstand/ufs.c,v 1.9 2006/04/03 01:58:45 dillon Exp $ */ /* $NetBSD: ufs.c,v 1.20 1998/03/01 07:15:39 ross Exp $ */ /*- @@ -102,7 +102,7 @@ struct fs_ops ufs_fsops = { struct file { off_t f_seekp; /* seek pointer */ struct fs *f_fs; /* pointer to super-block */ - struct dinode f_di; /* copy of on-disk inode */ + struct ufs1_dinode f_di; /* copy of on-disk inode */ int f_nindir[NIADDR]; /* number of blocks mapped by indirect block at level i */ @@ -155,9 +155,9 @@ read_inode(ino_t inumber, struct open_file *f) } { - struct dinode *dp; + struct ufs1_dinode *dp; - dp = (struct dinode *)buf; + dp = (struct ufs1_dinode *)buf; fp->f_di = dp[ino_to_fsbo(fs, inumber)]; } diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c index e8695dad54..47e88b73c7 100644 --- a/sbin/badsect/badsect.c +++ b/sbin/badsect/badsect.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1981, 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)badsect.c 8.1 (Berkeley) 6/5/93 * $FreeBSD: src/sbin/badsect/badsect.c,v 1.7.2.2 2001/07/30 10:30:04 dd Exp $ - * $DragonFly: src/sbin/badsect/badsect.c,v 1.10 2005/02/15 01:53:05 cpressey Exp $ + * $DragonFly: src/sbin/badsect/badsect.c,v 1.11 2006/04/03 01:58:46 dillon Exp $ */ /* @@ -49,8 +49,8 @@ #include #include -#include #include +#include #include #include diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c index 0a89dfaeb2..11bc5ffa5e 100644 --- a/sbin/clri/clri.c +++ b/sbin/clri/clri.c @@ -36,7 +36,7 @@ * @(#) Copyright (c) 1990, 1993 The Regents of the University of California. All rights reserved. * @(#)clri.c 8.2 (Berkeley) 9/23/93 * $FreeBSD: src/sbin/clri/clri.c,v 1.4 1999/08/28 00:12:32 peter Exp $ - * $DragonFly: src/sbin/clri/clri.c,v 1.7 2006/03/24 18:35:25 dillon Exp $ + * $DragonFly: src/sbin/clri/clri.c,v 1.8 2006/04/03 01:58:48 dillon Exp $ */ #include @@ -62,9 +62,9 @@ int main(int argc, char **argv) { struct fs *sbp; - struct dinode *ip; + struct ufs1_dinode *ip; int fd; - struct dinode ibuf[MAXBSIZE / sizeof (struct dinode)]; + struct ufs1_dinode ibuf[MAXBSIZE / sizeof (struct ufs1_dinode)]; long generation, bsize; off_t offset; int inonum; diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 6a7bfc691c..1c75507881 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -37,7 +37,7 @@ * @(#)disklabel.c 1.2 (Symmetric) 11/28/85 * @(#)disklabel.c 8.2 (Berkeley) 1/7/94 * $FreeBSD: src/sbin/disklabel/disklabel.c,v 1.28.2.15 2003/01/24 16:18:16 des Exp $ - * $DragonFly: src/sbin/disklabel/disklabel.c,v 1.10 2005/04/22 01:47:03 swildner Exp $ + * $DragonFly: src/sbin/disklabel/disklabel.c,v 1.11 2006/04/03 01:58:48 dillon Exp $ */ #include @@ -47,7 +47,10 @@ #define DKTYPENAMES #include #include + +#include #include + #include #include #include diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h index eb9272cc56..eb30b981db 100644 --- a/sbin/dump/dump.h +++ b/sbin/dump/dump.h @@ -33,12 +33,12 @@ * @(#)dump.h 8.2 (Berkeley) 4/28/95 * * $FreeBSD: src/sbin/dump/dump.h,v 1.7.6.4 2003/01/25 18:54:59 dillon Exp $ - * $DragonFly: src/sbin/dump/dump.h,v 1.11 2005/08/28 04:35:12 dillon Exp $ + * $DragonFly: src/sbin/dump/dump.h,v 1.12 2006/04/03 01:58:48 dillon Exp $ */ #include -#define MAXINOPB (MAXBSIZE / sizeof(struct dinode)) +#define MAXINOPB (MAXBSIZE / sizeof(struct ufs1_dinode)) #define MAXNINDIR (MAXBSIZE / sizeof(daddr_t)) /* @@ -111,8 +111,8 @@ void timeest(void); time_t unctime(const char *); /* mapping rouintes */ -struct dinode; -long blockest(struct dinode *); +struct ufs1_dinode; +long blockest(struct ufs1_dinode *); int mapfiles(ufs1_ino_t maxino, long *); int mapdirs(ufs1_ino_t maxino, long *); @@ -120,7 +120,7 @@ int mapdirs(ufs1_ino_t maxino, long *); void blksout(daddr_t *, int, ufs1_ino_t); void bread(daddr_t, char *, int); ssize_t cread(int, void *, size_t, off_t); -void dumpino(struct dinode *, ufs1_ino_t); +void dumpino(struct ufs1_dinode *, ufs1_ino_t); void dumpmap(const char *, int, ufs1_ino_t); void writeheader(ufs1_ino_t); @@ -137,7 +137,7 @@ void dumpabort(int); void getfstab(void); char *rawname(char *); -struct dinode *getino(ufs1_ino_t); +struct ufs1_dinode *getino(ufs1_ino_t); /* rdump routines */ #if defined(RDUMP) || defined(RRESTORE) diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index 7709aa4d2c..ce1242bdb6 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -32,21 +32,15 @@ * * @(#)itime.c 8.1 (Berkeley) 6/5/93 * $FreeBSD: src/sbin/dump/itime.c,v 1.3.2.1 2001/08/01 06:29:35 obrien Exp $ - * $DragonFly: src/sbin/dump/itime.c,v 1.9 2005/04/13 16:07:15 joerg Exp $ + * $DragonFly: src/sbin/dump/itime.c,v 1.10 2006/04/03 01:58:48 dillon Exp $ */ #include #include #include -#ifdef sunos -#include -#include -#include -#include -#else #include -#endif +#include #include diff --git a/sbin/dump/main.c b/sbin/dump/main.c index f73c44ffbd..e05a7f9633 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1980, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)main.c 8.6 (Berkeley) 5/1/95 * $FreeBSD: src/sbin/dump/main.c,v 1.20.2.9 2003/01/25 18:54:59 dillon Exp $ - * $DragonFly: src/sbin/dump/main.c,v 1.13 2005/08/28 04:35:12 dillon Exp $ + * $DragonFly: src/sbin/dump/main.c,v 1.14 2006/04/03 01:58:48 dillon Exp $ */ #include @@ -92,7 +92,7 @@ main(int argc, char **argv) struct stat sb; ufs1_ino_t ino; int dirty; - struct dinode *dp; + struct ufs1_dinode *dp; struct fstab *dt; char *map; int ch; diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 826ce49494..6aedc679d3 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -32,7 +32,7 @@ * * @(#)traverse.c 8.7 (Berkeley) 6/15/95 * $FreeBSD: src/sbin/dump/traverse.c,v 1.10.2.6 2003/04/14 20:10:35 johan Exp $ - * $DragonFly: src/sbin/dump/traverse.c,v 1.13 2005/08/28 04:35:12 dillon Exp $ + * $DragonFly: src/sbin/dump/traverse.c,v 1.14 2006/04/03 01:58:48 dillon Exp $ */ #include @@ -82,7 +82,7 @@ static int searchdir(ufs1_ino_t, daddr_t, long, long, long *, int); * hence the estimate may be high. */ long -blockest(struct dinode *dp) +blockest(struct ufs1_dinode *dp) { long blkest, sizeest; @@ -138,7 +138,7 @@ mapfiles(ufs1_ino_t maxino, long *tape_size) { int mode; ufs1_ino_t ino; - struct dinode *dp; + struct ufs1_dinode *dp; int anydirskipped = 0; for (ino = ROOTINO; ino < maxino; ino++) { @@ -191,11 +191,11 @@ mapfiles(ufs1_ino_t maxino, long *tape_size) int mapdirs(ufs1_ino_t maxino, long *tape_size) { - struct dinode *dp; + struct ufs1_dinode *dp; int i, isdir, nodump; char *map; ufs1_ino_t ino; - struct dinode di; + struct ufs1_dinode di; long filesize; int ret, change = 0; @@ -303,7 +303,7 @@ searchdir(ufs1_ino_t ino, daddr_t blkno, long size, long filesize, long *tape_size, int nodump) { struct direct *dp; - struct dinode *ip; + struct ufs1_dinode *ip; long loc, ret = 0; char dblk[MAXBSIZE]; @@ -362,7 +362,7 @@ searchdir(ufs1_ino_t ino, daddr_t blkno, long size, long filesize, * Dump the contents of an inode to tape. */ void -dumpino(struct dinode *dp, ufs1_ino_t ino) +dumpino(struct ufs1_dinode *dp, ufs1_ino_t ino) { int ind_level, cnt; fsizeT size; @@ -538,11 +538,11 @@ writeheader(ufs1_ino_t ino) writerec(&spcl, 1); } -struct dinode * +struct ufs1_dinode * getino(ufs1_ino_t inum) { static daddr_t minino, maxino; - static struct dinode inoblock[MAXINOPB]; + static struct ufs1_dinode inoblock[MAXINOPB]; curino = inum; if (inum >= minino && inum < maxino) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 9687a2be6d..09a0db5e74 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -33,12 +33,13 @@ * @(#) Copyright (c) 1983, 1992, 1993 The Regents of the University of California. All rights reserved. * @(#)dumpfs.c 8.5 (Berkeley) 4/29/95 * $FreeBSD: src/sbin/dumpfs/dumpfs.c,v 1.13.2.1 2001/01/22 18:10:11 iedowse Exp $ - * $DragonFly: src/sbin/dumpfs/dumpfs.c,v 1.7 2005/11/06 12:09:06 swildner Exp $ + * $DragonFly: src/sbin/dumpfs/dumpfs.c,v 1.8 2006/04/03 01:58:49 dillon Exp $ */ #include #include +#include #include #include diff --git a/sbin/ffsinfo/ffsinfo.c b/sbin/ffsinfo/ffsinfo.c index ea984ffdd8..3ca3b0fd4f 100644 --- a/sbin/ffsinfo/ffsinfo.c +++ b/sbin/ffsinfo/ffsinfo.c @@ -37,7 +37,7 @@ * * $TSHeader: src/sbin/ffsinfo/ffsinfo.c,v 1.4 2000/12/12 19:30:55 tomsoft Exp $ * $FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.3.2.1 2001/07/16 15:01:56 tomsoft Exp $ - * $DragonFly: src/sbin/ffsinfo/ffsinfo.c,v 1.2 2003/06/17 04:27:32 dillon Exp $ + * $DragonFly: src/sbin/ffsinfo/ffsinfo.c,v 1.3 2006/04/03 01:58:49 dillon Exp $ * * @(#) Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz Copyright (c) 1980, 1989, 1993 The Regents of the University of California. All rights reserved. * $FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.3.2.1 2001/07/16 15:01:56 tomsoft Exp $ @@ -88,7 +88,7 @@ static struct csum *fscs; static void rdfs(daddr_t, size_t, void *, int); static void usage(void); static struct disklabel *get_disklabel(int); -static struct dinode *ginode(ino_t, int); +static struct ufs1_dinode *ginode(ino_t, int); static void dump_whole_inode(ino_t, int, int); /* ************************************************************** rdfs ***** */ @@ -423,7 +423,7 @@ void dump_whole_inode(ino_t inode, int fsi, int level) { DBG_FUNC("dump_whole_inode") - struct dinode *ino; + struct ufs1_dinode *ino; int rb; unsigned int ind2ctr, ind3ctr; ufs_daddr_t *ind2ptr, *ind3ptr; @@ -607,17 +607,17 @@ usage(void) * not read the same block again and again if we iterate linearly over all * inodes. */ -struct dinode * +struct ufs1_dinode * ginode(ino_t inumber, int fsi) { DBG_FUNC("ginode") ufs_daddr_t iblk; static ino_t startinum=0; /* first inode in cached block */ - struct dinode *pi; + struct ufs1_dinode *pi; DBG_ENTER; - pi=(struct dinode *)(void *)ablk; + pi=(struct ufs1_dinode *)(void *)ablk; if (startinum == 0 || inumber < startinum || inumber >= startinum + INOPB(&sblock)) { /* diff --git a/sbin/fsck/dir.c b/sbin/fsck/dir.c index e923f3eead..f092ab0788 100644 --- a/sbin/fsck/dir.c +++ b/sbin/fsck/dir.c @@ -32,7 +32,7 @@ * * @(#)dir.c 8.8 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/dir.c,v 1.15 1999/08/28 00:12:45 peter Exp $ - * $DragonFly: src/sbin/fsck/dir.c,v 1.8 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/dir.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -61,7 +61,7 @@ struct odirtemplate odirhead = { static int chgino(struct inodesc *); static int dircheck(struct inodesc *, struct direct *); -static int expanddir(struct dinode *dp, char *name); +static int expanddir(struct ufs1_dinode *dp, char *name); static void freedir(ino_t ino, ino_t parent); static struct direct *fsck_readdir(struct inodesc *); static struct bufarea *getdirblk(ufs_daddr_t blkno, long size); @@ -272,7 +272,7 @@ direrror(ino_t ino, char *errmesg) void fileerror(ino_t cwd, ino_t ino, char *errmesg) { - struct dinode *dp; + struct ufs1_dinode *dp; char pathbuf[MAXPATHLEN + 1]; pwarn("%s ", errmesg); @@ -294,7 +294,7 @@ fileerror(ino_t cwd, ino_t ino, char *errmesg) void adjust(struct inodesc *idesc, int lcnt) { - struct dinode *dp; + struct ufs1_dinode *dp; int saveresolved; dp = ginode(idesc->id_number); @@ -410,7 +410,7 @@ chgino(struct inodesc *idesc) int linkup(ino_t orphan, ino_t parentdir, char *name) { - struct dinode *dp; + struct ufs1_dinode *dp; int lostdir; ino_t oldlfdir; struct inodesc idesc; @@ -543,7 +543,7 @@ changeino(ino_t dir, char *name, ino_t newnum) int makeentry(ino_t parent, ino_t ino, char *name) { - struct dinode *dp; + struct ufs1_dinode *dp; struct inodesc idesc; char pathbuf[MAXPATHLEN + 1]; @@ -575,7 +575,7 @@ makeentry(ino_t parent, ino_t ino, char *name) * Attempt to expand the size of a directory */ static int -expanddir(struct dinode *dp, char *name) +expanddir(struct ufs1_dinode *dp, char *name) { ufs_daddr_t lastbn, newblk; struct bufarea *bp; @@ -634,7 +634,7 @@ allocdir(ino_t parent, ino_t request, int mode) { ino_t ino; char *cp; - struct dinode *dp; + struct ufs1_dinode *dp; struct bufarea *bp; struct dirtemplate *dirp; @@ -687,7 +687,7 @@ allocdir(ino_t parent, ino_t request, int mode) static void freedir(ino_t ino, ino_t parent) { - struct dinode *dp; + struct ufs1_dinode *dp; if (ino != parent) { dp = ginode(parent); diff --git a/sbin/fsck/fsck.h b/sbin/fsck/fsck.h index f58f52ec87..9237cdaf86 100644 --- a/sbin/fsck/fsck.h +++ b/sbin/fsck/fsck.h @@ -32,7 +32,7 @@ * * @(#)fsck.h 8.4 (Berkeley) 5/9/95 * $FreeBSD: src/sbin/fsck/fsck.h,v 1.12.2.1 2001/01/23 23:11:07 iedowse Exp $ - * $DragonFly: src/sbin/fsck/fsck.h,v 1.4 2003/11/03 19:51:04 eirikn Exp $ + * $DragonFly: src/sbin/fsck/fsck.h,v 1.5 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -89,7 +89,7 @@ struct bufarea { ufs_daddr_t *b_indir; /* indirect block */ struct fs *b_fs; /* super block */ struct cg *b_cg; /* cylinder group */ - struct dinode *b_dinode; /* inode block */ + struct ufs1_dinode *b_dinode; /* inode block */ } b_un; char b_dirty; }; @@ -222,7 +222,7 @@ ufs_daddr_t n_files; /* number of files in use */ int got_siginfo; /* received a SIGINFO */ #define clearinode(dp) (*(dp) = zino) -struct dinode zino; +struct ufs1_dinode zino; #define setbmap(blkno) setbit(blockmap, blkno) #define testbmap(blkno) isset(blockmap, blkno) @@ -248,7 +248,7 @@ char *blockcheck(char *name); int bread(int fd, char *buf, ufs_daddr_t blk, long size); void bufinit(void); void bwrite(int fd, char *buf, ufs_daddr_t blk, long size); -void cacheino(struct dinode *dp, ino_t inumber); +void cacheino(struct ufs1_dinode *dp, ino_t inumber); void catch(int); void catchquit(int); int changeino(ino_t dir, char *name, ino_t newnum); @@ -257,7 +257,7 @@ int checkfstab(int preen, int maxrun, int (*chkit)(char *, char *, long, int)); int chkrange(ufs_daddr_t blk, int cnt); void ckfini(int markclean); -int ckinode(struct dinode *dp, struct inodesc *); +int ckinode(struct ufs1_dinode *dp, struct inodesc *); void clri(struct inodesc *, char *type, int flag); int clearentry(struct inodesc *); void direrror(ino_t ino, char *errmesg); @@ -274,13 +274,13 @@ void flush(int fd, struct bufarea *bp); void freeblk(ufs_daddr_t blkno, long frags); void freeino(ino_t ino); void freeinodebuf(void); -int ftypeok(struct dinode *dp); +int ftypeok(struct ufs1_dinode *dp); void getblk(struct bufarea *bp, ufs_daddr_t blk, long size); struct bufarea *getdatablk(ufs_daddr_t blkno, long size); struct inoinfo *getinoinfo(ino_t inumber); -struct dinode *getnextinode(ino_t inumber); +struct ufs1_dinode *getnextinode(ino_t inumber); void getpathname(char *namebuf, ino_t curdir, ino_t ino); -struct dinode *ginode(ino_t inumber); +struct ufs1_dinode *ginode(ino_t inumber); void infohandler(int sig); void inocleanup(void); void inodirty(void); diff --git a/sbin/fsck/inode.c b/sbin/fsck/inode.c index 4c89dedee1..86c5ba9404 100644 --- a/sbin/fsck/inode.c +++ b/sbin/fsck/inode.c @@ -32,7 +32,7 @@ * * @(#)inode.c 8.8 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/inode.c,v 1.20 2000/02/28 20:02:41 mckusick Exp $ - * $DragonFly: src/sbin/fsck/inode.c,v 1.8 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/inode.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -53,12 +53,12 @@ static ino_t startinum; static int iblock(struct inodesc *, long ilevel, quad_t isize); int -ckinode(struct dinode *dp, struct inodesc *idesc) +ckinode(struct ufs1_dinode *dp, struct inodesc *idesc) { ufs_daddr_t *ap; int ret; long n, ndb, offset; - struct dinode dino; + struct ufs1_dinode dino; quad_t remsize, sizepb; mode_t mode; char pathbuf[MAXPATHLEN + 1]; @@ -151,7 +151,7 @@ iblock(struct inodesc *idesc, long ilevel, quad_t isize) quad_t sizepb; char buf[BUFSIZ]; char pathbuf[MAXPATHLEN + 1]; - struct dinode *dp; + struct ufs1_dinode *dp; if (idesc->id_type == ADDR) { func = idesc->id_func; @@ -268,7 +268,7 @@ chkrange(ufs_daddr_t blk, int cnt) /* * General purpose interface for reading inodes. */ -struct dinode * +struct ufs1_dinode * ginode(ino_t inumber) { ufs_daddr_t iblk; @@ -292,14 +292,14 @@ ginode(ino_t inumber) */ ino_t nextino, lastinum; long readcnt, readpercg, fullcnt, inobufsize, partialcnt, partialsize; -struct dinode *inodebuf; +struct ufs1_dinode *inodebuf; -struct dinode * +struct ufs1_dinode * getnextinode(ino_t inumber) { long size; ufs_daddr_t dblk; - static struct dinode *dp; + static struct ufs1_dinode *dp; if (inumber != nextino++ || inumber > maxino) errx(EEXIT, "bad inode number %d to nextinode", inumber); @@ -336,17 +336,17 @@ setinodebuf(ino_t inum) if (inodebuf != NULL) return; inobufsize = blkroundup(&sblock, INOBUFSIZE); - fullcnt = inobufsize / sizeof(struct dinode); + fullcnt = inobufsize / sizeof(struct ufs1_dinode); readpercg = sblock.fs_ipg / fullcnt; partialcnt = sblock.fs_ipg % fullcnt; - partialsize = partialcnt * sizeof(struct dinode); + partialsize = partialcnt * sizeof(struct ufs1_dinode); if (partialcnt != 0) { readpercg++; } else { partialcnt = fullcnt; partialsize = inobufsize; } - if ((inodebuf = (struct dinode *)malloc((unsigned)inobufsize)) == NULL) + if ((inodebuf = (struct ufs1_dinode *)malloc((unsigned)inobufsize)) == NULL) errx(EEXIT, "cannot allocate space for inode buffer"); } @@ -367,7 +367,7 @@ freeinodebuf(void) * Enter inodes into the cache. */ void -cacheino(struct dinode *dp, ino_t inumber) +cacheino(struct ufs1_dinode *dp, ino_t inumber) { struct inoinfo *inp; struct inoinfo **inpp; @@ -443,7 +443,7 @@ inodirty(void) void clri(struct inodesc *idesc, char *type, int flag) { - struct dinode *dp; + struct ufs1_dinode *dp; dp = ginode(idesc->id_number); if (flag == 1) { @@ -506,7 +506,7 @@ clearentry(struct inodesc *idesc) void pinode(ino_t ino) { - struct dinode *dp; + struct ufs1_dinode *dp; char *p; struct passwd *pw; time_t t; @@ -562,7 +562,7 @@ ino_t allocino(ino_t request, int type) { ino_t ino; - struct dinode *dp; + struct ufs1_dinode *dp; struct cg *cgp = &cgrp; int cg; @@ -621,7 +621,7 @@ void freeino(ino_t ino) { struct inodesc idesc; - struct dinode *dp; + struct ufs1_dinode *dp; memset(&idesc, 0, sizeof(struct inodesc)); idesc.id_type = ADDR; diff --git a/sbin/fsck/pass1.c b/sbin/fsck/pass1.c index 3d077896a3..196d06e5f2 100644 --- a/sbin/fsck/pass1.c +++ b/sbin/fsck/pass1.c @@ -32,7 +32,7 @@ * * @(#)pass1.c 8.6 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/pass1.c,v 1.16.2.5 2002/06/23 22:34:58 iedowse Exp $ - * $DragonFly: src/sbin/fsck/pass1.c,v 1.7 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/pass1.c,v 1.8 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -174,7 +174,7 @@ pass1(void) static void checkinode(ino_t inumber, struct inodesc *idesc) { - struct dinode *dp; + struct ufs1_dinode *dp; struct zlncnt *zlnp; u_int64_t kernmaxfilesize; ufs_daddr_t ndb, j; diff --git a/sbin/fsck/pass1b.c b/sbin/fsck/pass1b.c index a3adc03d51..b915a50c95 100644 --- a/sbin/fsck/pass1b.c +++ b/sbin/fsck/pass1b.c @@ -32,7 +32,7 @@ * * @(#)pass1b.c 8.4 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/pass1b.c,v 1.7.2.1 2001/01/23 23:11:07 iedowse Exp $ - * $DragonFly: src/sbin/fsck/pass1b.c,v 1.6 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/pass1b.c,v 1.7 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -51,7 +51,7 @@ void pass1b(void) { int c, i; - struct dinode *dp; + struct ufs1_dinode *dp; struct inodesc idesc; ino_t inumber; diff --git a/sbin/fsck/pass2.c b/sbin/fsck/pass2.c index 515fe02d79..9a3f87c8fd 100644 --- a/sbin/fsck/pass2.c +++ b/sbin/fsck/pass2.c @@ -32,7 +32,7 @@ * * @(#)pass2.c 8.9 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/pass2.c,v 1.10.2.2 2001/11/24 15:14:59 iedowse Exp $ - * $DragonFly: src/sbin/fsck/pass2.c,v 1.8 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/pass2.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -53,11 +53,11 @@ static int pass2check(struct inodesc *); void pass2(void) { - struct dinode *dp; + struct ufs1_dinode *dp; struct inoinfo **inpp, *inp; struct inoinfo **inpend; struct inodesc curino; - struct dinode dino; + struct ufs1_dinode dino; char pathbuf[MAXPATHLEN + 1]; switch (inoinfo(ROOTINO)->ino_state) { @@ -168,7 +168,7 @@ pass2(void) dp = &dino; } } - memset(&dino, 0, sizeof(struct dinode)); + memset(&dino, 0, sizeof(struct ufs1_dinode)); dino.di_mode = IFDIR; dp->di_size = inp->i_isize; memmove(&dp->di_db[0], &inp->i_blks[0], (size_t)inp->i_numblks); @@ -220,7 +220,7 @@ pass2check(struct inodesc *idesc) struct direct *dirp = idesc->id_dirp; struct inoinfo *inp; int n, entrysize, ret = 0; - struct dinode *dp; + struct ufs1_dinode *dp; char *errmsg; struct direct proto; char namebuf[MAXPATHLEN + 1]; diff --git a/sbin/fsck/pass4.c b/sbin/fsck/pass4.c index fa89dddcdf..9932227563 100644 --- a/sbin/fsck/pass4.c +++ b/sbin/fsck/pass4.c @@ -32,7 +32,7 @@ * * @(#)pass4.c 8.4 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/pass4.c,v 1.7.2.1 2001/01/23 23:11:07 iedowse Exp $ - * $DragonFly: src/sbin/fsck/pass4.c,v 1.5 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/pass4.c,v 1.6 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -50,7 +50,7 @@ pass4(void) { ino_t inumber; struct zlncnt *zlnp; - struct dinode *dp; + struct ufs1_dinode *dp; struct inodesc idesc; int i, n, cg; diff --git a/sbin/fsck/utilities.c b/sbin/fsck/utilities.c index efede8622d..6a0aa99340 100644 --- a/sbin/fsck/utilities.c +++ b/sbin/fsck/utilities.c @@ -32,7 +32,7 @@ * * @(#)utilities.c 8.6 (Berkeley) 5/19/95 * $FreeBSD: src/sbin/fsck/utilities.c,v 1.11.2.3 2001/01/23 23:11:07 iedowse Exp $ - * $DragonFly: src/sbin/fsck/utilities.c,v 1.8 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/utilities.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -51,7 +51,7 @@ long diskreads, totalreads; /* Disk cache statistics */ static void rwerror(char *mesg, ufs_daddr_t blk); int -ftypeok(struct dinode *dp) +ftypeok(struct ufs1_dinode *dp) { switch (dp->di_mode & IFMT) { diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index 1210e9b451..3d19de0fb6 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/fsdb/fsdb.c,v 1.13.2.3 2002/03/20 13:39:02 joerg Exp $ - * $DragonFly: src/sbin/fsdb/fsdb.c,v 1.8 2005/11/13 11:58:30 corecode Exp $ + * $DragonFly: src/sbin/fsdb/fsdb.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -272,7 +272,7 @@ cmdloop(void) return rval; } -struct dinode *curinode; +struct ufs1_dinode *curinode; ino_t curinum, ocurrent; #define GETINUM(ac,inum) inum = strtoul(argv[ac], &cp, 0); \ @@ -309,7 +309,7 @@ CMDFUNCSTART(back) CMDFUNCSTART(zapi) { ino_t inum; - struct dinode *dp; + struct ufs1_dinode *dp; char *cp; GETINUM(1,inum); diff --git a/sbin/fsdb/fsdb.h b/sbin/fsdb/fsdb.h index 0629035b22..7ee5d0a469 100644 --- a/sbin/fsdb/fsdb.h +++ b/sbin/fsdb/fsdb.h @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/fsdb/fsdb.h,v 1.4.2.1 2002/03/20 13:39:02 joerg Exp $ - * $DragonFly: src/sbin/fsdb/fsdb.h,v 1.3 2003/11/01 17:15:59 drhodus Exp $ + * $DragonFly: src/sbin/fsdb/fsdb.h,v 1.4 2006/04/03 01:58:49 dillon Exp $ */ extern int bread(int fd, char *buf, daddr_t blk, long size); @@ -51,12 +51,12 @@ struct cmdtable { #define FL_WR 0x0001 /* wants to write */ int (*handler)(int argc, char *argv[]); }; -extern struct dinode *curinode; +extern struct ufs1_dinode *curinode; extern ino_t curinum; int argcount(struct cmdtable *cmdp, int argc, char *argv[]); char **crack(char *line, int *argc); -void printstat(const char *cp, ino_t inum, struct dinode *dp); +void printstat(const char *cp, ino_t inum, struct ufs1_dinode *dp); int printactive(int doblocks); int checkactive(void); int checkactivedir(void); diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index 6259152a54..80abcb4bc3 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/fsdb/fsdbutil.c,v 1.9.2.2 2002/03/20 13:39:02 joerg Exp $ - * $DragonFly: src/sbin/fsdb/fsdbutil.c,v 1.6 2004/02/04 17:39:59 joerg Exp $ + * $DragonFly: src/sbin/fsdb/fsdbutil.c,v 1.7 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -49,7 +49,7 @@ static int charsperline(void); static int printindir(ufs_daddr_t blk, int level, char *bufp); -static void printblocks(ino_t inum, struct dinode *dp); +static void printblocks(ino_t inum, struct ufs1_dinode *dp); char ** crack(char *line, int *argc) @@ -83,7 +83,7 @@ argcount(struct cmdtable *cmdp, int argc, char **argv) } void -printstat(const char *cp, ino_t inum, struct dinode *dp) +printstat(const char *cp, ino_t inum, struct ufs1_dinode *dp) { struct group *grp; struct passwd *pw; @@ -230,7 +230,7 @@ printindir(ufs_daddr_t blk, int level, char *bufp) * Print the block pointers for one inode. */ static void -printblocks(ino_t inum, struct dinode *dp) +printblocks(ino_t inum, struct ufs1_dinode *dp) { char *bufp; int i, nfrags; diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index c3aae44b82..370016973f 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -30,7 +30,7 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/fsirand/fsirand.c,v 1.7.2.1 2000/07/01 06:23:36 ps Exp $ - * $DragonFly: src/sbin/fsirand/fsirand.c,v 1.7 2005/02/13 19:12:26 cpressey Exp $ + * $DragonFly: src/sbin/fsirand/fsirand.c,v 1.8 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -38,8 +38,8 @@ #include #include -#include #include +#include #include #include @@ -102,7 +102,7 @@ main(int argc, char **argv) int fsirand(char *device) { - static struct dinode *inodebuf; + static struct ufs1_dinode *inodebuf; static ssize_t oldibufsize = 0; ssize_t ibufsize; struct fs *sblock; @@ -186,7 +186,7 @@ fsirand(char *device) sblock = (struct fs *)&sbuf; /* XXX - should really cap buffer at 512kb or so */ - ibufsize = sizeof(struct dinode) * sblock->fs_ipg; + ibufsize = sizeof(struct ufs1_dinode) * sblock->fs_ipg; if (oldibufsize < ibufsize) { if ((inodebuf = realloc(inodebuf, ibufsize)) == NULL) errx(1, "can't allocate memory for inode buffer"); diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index d7378ba385..93ab9dbd50 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -37,7 +37,7 @@ * * $TSHeader: src/sbin/growfs/debug.c,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ * $FreeBSD: src/sbin/growfs/debug.c,v 1.3.2.1 2001/07/16 15:02:13 tomsoft Exp $ - * $DragonFly: src/sbin/growfs/debug.c,v 1.3 2003/08/08 04:18:38 dillon Exp $ + * $DragonFly: src/sbin/growfs/debug.c,v 1.4 2006/04/03 01:58:49 dillon Exp $ * * $FreeBSD: src/sbin/growfs/debug.c,v 1.3.2.1 2001/07/16 15:02:13 tomsoft Exp $ */ @@ -591,7 +591,7 @@ dbg_dump_sptbl(struct fs *sb, const char *comment, struct cg *cgr) * Dump an inode structure. */ void -dbg_dump_ino(struct fs *sb, const char *comment, struct dinode *ino) +dbg_dump_ino(struct fs *sb, const char *comment, struct ufs1_dinode *ino) { int ictr; int remaining_blocks; diff --git a/sbin/growfs/debug.h b/sbin/growfs/debug.h index 99ecd2696b..d39be3e9c2 100644 --- a/sbin/growfs/debug.h +++ b/sbin/growfs/debug.h @@ -37,7 +37,7 @@ * * $TSHeader: src/sbin/growfs/debug.h,v 1.2 2000/11/16 18:43:50 tom Exp $ * $FreeBSD: src/sbin/growfs/debug.h,v 1.1.2.1 2001/07/16 15:02:13 tomsoft Exp $ - * $DragonFly: src/sbin/growfs/debug.h,v 1.3 2003/08/08 04:18:38 dillon Exp $ + * $DragonFly: src/sbin/growfs/debug.h,v 1.4 2006/04/03 01:58:49 dillon Exp $ * */ @@ -55,7 +55,7 @@ void dbg_dump_hex(struct fs *, const char *, unsigned char *); void dbg_dump_fs(struct fs *, const char *); void dbg_dump_cg(const char *, struct cg *); void dbg_dump_csum(const char *, struct csum *); -void dbg_dump_ino(struct fs *, const char *, struct dinode *); +void dbg_dump_ino(struct fs *, const char *, struct ufs1_dinode *); void dbg_dump_iblk(struct fs *, const char *, char *, size_t); void dbg_dump_inmap(struct fs *, const char *, struct cg *); void dbg_dump_frmap(struct fs *, const char *, struct cg *); diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 7ed5e86412..311a4158bb 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -39,7 +39,7 @@ * * @(#) Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz Copyright (c) 1980, 1989, 1993 The Regents of the University of California. All rights reserved. * $FreeBSD: src/sbin/growfs/growfs.c,v 1.4.2.2 2001/08/14 12:45:11 chm Exp $ - * $DragonFly: src/sbin/growfs/growfs.c,v 1.4 2005/11/06 12:16:44 swildner Exp $ + * $DragonFly: src/sbin/growfs/growfs.c,v 1.5 2006/04/03 01:58:49 dillon Exp $ */ /* ********************************************************** INCLUDES ***** */ @@ -98,7 +98,7 @@ enum pointer_source { static struct csum *fscs; /* cylinder summary */ -static struct dinode zino[MAXBSIZE/sizeof(struct dinode)]; /* some inodes */ +static struct ufs1_dinode zino[MAXBSIZE/sizeof(struct ufs1_dinode)]; /* some inodes */ /* * An array of elements of type struct gfs_bpp describes all blocks to @@ -129,7 +129,7 @@ static void updjcg(int, time_t, int, int, unsigned int); static void updcsloc(time_t, int, int, unsigned int); static struct disklabel *get_disklabel(int); static void return_disklabel(int, struct disklabel *, unsigned int); -static struct dinode *ginode(ino_t, int, int); +static struct ufs1_dinode *ginode(ino_t, int, int); static void frag_adjust(daddr_t, int); static void cond_bl_upd(ufs_daddr_t *, struct gfs_bpp *, enum pointer_source, int, unsigned int); @@ -421,7 +421,7 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag) } for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { #ifdef FSIRAND - for (j = 0; j < sblock.fs_bsize / sizeof(struct dinode); j++) { + for (j = 0; j < sblock.fs_bsize / sizeof(struct ufs1_dinode); j++) { zino[j].di_gen = random(); } #endif @@ -1848,17 +1848,17 @@ setblock(struct fs *fs, unsigned char *cp, int h) * not read the same block again and again if we iterate linearly over all * inodes. */ -static struct dinode * +static struct ufs1_dinode * ginode(ino_t inumber, int fsi, int cg) { DBG_FUNC("ginode") ufs_daddr_t iblk; static ino_t startinum=0; /* first inode in cached block */ - struct dinode *pi; + struct ufs1_dinode *pi; DBG_ENTER; - pi=(struct dinode *)(void *)ablk; + pi=(struct ufs1_dinode *)(void *)ablk; inumber+=(cg * sblock.fs_ipg); if (startinum == 0 || inumber < startinum || inumber >= startinum + INOPB(&sblock)) { @@ -2363,7 +2363,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int DBG_FUNC("updrefs") unsigned int ictr, ind2ctr, ind3ctr; ufs_daddr_t *iptr, *ind2ptr, *ind3ptr; - struct dinode *ino; + struct ufs1_dinode *ino; int remaining_blocks; DBG_ENTER; diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index d9989ccd73..c396dd032a 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -32,7 +32,7 @@ * * @(#)mkfs.c 8.11 (Berkeley) 5/3/95 * $FreeBSD: src/sbin/newfs/mkfs.c,v 1.29.2.6 2001/09/21 19:15:21 dillon Exp $ - * $DragonFly: src/sbin/newfs/mkfs.c,v 1.10 2005/01/06 03:21:00 cpressey Exp $ + * $DragonFly: src/sbin/newfs/mkfs.c,v 1.11 2006/04/03 01:58:49 dillon Exp $ */ #include "defs.h" @@ -65,7 +65,7 @@ extern void srandomdev(void); #define MAXIPG(fs) roundup((fs)->fs_bsize * NBBY / 3, INOPB(fs)) #define UMASK 0755 -#define MAXINOPB (MAXBSIZE / sizeof(struct dinode)) +#define MAXINOPB (MAXBSIZE / sizeof(struct ufs1_dinode)) #define POWEROF2(num) (((num) & ((num) - 1)) == 0) /* @@ -121,7 +121,7 @@ union { } cgun; #define acg cgun.cg -struct dinode zino[MAXBSIZE / sizeof(struct dinode)]; +struct ufs1_dinode zino[MAXBSIZE / sizeof(struct ufs1_dinode)]; int fsi, fso; static fsnode_t copyroot; @@ -136,7 +136,7 @@ void clrblock(struct fs *, unsigned char *, int); void fsinit(time_t); void initcg(int, time_t); int isblock(struct fs *, unsigned char *, int); -void iput(struct dinode *, ino_t); +void iput(struct ufs1_dinode *, ino_t); int makedir(struct direct *, int); void parentready(int); void rdfs(daddr_t, int, char *); @@ -334,7 +334,7 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo, const char *mfscopy) } sblock.fs_nrpos = nrpos; sblock.fs_nindir = sblock.fs_bsize / sizeof(daddr_t); - sblock.fs_inopb = sblock.fs_bsize / sizeof(struct dinode); + sblock.fs_inopb = sblock.fs_bsize / sizeof(struct ufs1_dinode); sblock.fs_nspf = sblock.fs_fsize / sectorsize; for (sblock.fs_fsbtodb = 0, i = NSPF(&sblock); i > 1; i >>= 1) sblock.fs_fsbtodb++; @@ -365,7 +365,7 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo, const char *mfscopy) /* void */; mincpc = sblock.fs_cpc; bpcg = sblock.fs_spc * sectorsize; - inospercg = roundup(bpcg / sizeof(struct dinode), INOPB(&sblock)); + inospercg = roundup(bpcg / sizeof(struct ufs1_dinode), INOPB(&sblock)); if (inospercg > MAXIPG(&sblock)) inospercg = MAXIPG(&sblock); used = (sblock.fs_iblkno + inospercg / INOPF(&sblock)) * NSPF(&sblock); @@ -839,7 +839,7 @@ initcg(int cylno, time_t utime) for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { #ifdef FSIRAND for (j = 0; - j < sblock.fs_bsize / sizeof(struct dinode); + j < sblock.fs_bsize / sizeof(struct ufs1_dinode); j++) { zino[j].di_gen = random(); } @@ -931,7 +931,7 @@ initcg(int cylno, time_t utime) /* * initialize the file system */ -struct dinode node; +struct ufs1_dinode node; #ifdef LOSTDIR #define PREDEFDIR 3 @@ -1139,9 +1139,9 @@ calcipg(long cylspg, long bpcg, off_t *usedbp) * Allocate an inode on the disk */ void -iput(struct dinode *ip, ino_t ino) +iput(struct ufs1_dinode *ip, ino_t ino) { - struct dinode inobuf[MAXINOPB]; + struct ufs1_dinode inobuf[MAXINOPB]; daddr_t d; int c; diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c index e6938e0fac..a165bcf052 100644 --- a/sbin/quotacheck/quotacheck.c +++ b/sbin/quotacheck/quotacheck.c @@ -36,7 +36,7 @@ * @(#) Copyright (c) 1980, 1990, 1993 The Regents of the University of California. All rights reserved. * @(#)quotacheck.c 8.3 (Berkeley) 1/29/94 * $FreeBSD: src/sbin/quotacheck/quotacheck.c,v 1.11 1999/08/28 00:14:01 peter Exp $ - * $DragonFly: src/sbin/quotacheck/quotacheck.c,v 1.8 2005/11/06 12:45:58 swildner Exp $ + * $DragonFly: src/sbin/quotacheck/quotacheck.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ */ /* @@ -106,7 +106,7 @@ extern int checkfstab(int, int, int (*)(struct fstab *), int (*)(char *, char *, long, int)); int chkquota(char *, char *, struct quotaname *); void freeinodebuf(void); -struct dinode * +struct ufs1_dinode * getnextinode(ino_t); int getquotagid(void); int hasquota(struct fstab *, int, char **); @@ -234,7 +234,7 @@ int chkquota(char *fsname, char *mntpt, struct quotaname *qnp) { struct fileusage *fup; - struct dinode *dp; + struct ufs1_dinode *dp; int cg, i, mode, errs = 0; ino_t ino; @@ -302,9 +302,9 @@ update(char *fsname, char *quotafile, int type) FILE *qfi, *qfo; u_long id, lastid; off_t offset; - struct dqblk dqbuf; + struct ufs_dqblk dqbuf; static int warned = 0; - static struct dqblk zerodqbuf; + static struct ufs_dqblk zerodqbuf; static struct fileusage zerofileusage; if ((qfo = fopen(quotafile, "r+")) == NULL) { @@ -332,8 +332,8 @@ update(char *fsname, char *quotafile, int type) "Quotas are not compiled into this kernel"); } for (lastid = highid[type], id = 0, offset = 0; id <= lastid; - id++, offset += sizeof(struct dqblk)) { - if (fread((char *)&dqbuf, sizeof(struct dqblk), 1, qfi) == 0) + id++, offset += sizeof(struct ufs_dqblk)) { + if (fread((char *)&dqbuf, sizeof(struct ufs_dqblk), 1, qfi) == 0) dqbuf = zerodqbuf; if ((fup = lookup(id, type)) == 0) fup = &zerofileusage; @@ -375,7 +375,7 @@ update(char *fsname, char *quotafile, int type) warn("%s: seek failed", quotafile); return(1); } - fwrite((char *)&dqbuf, sizeof(struct dqblk), 1, qfo); + fwrite((char *)&dqbuf, sizeof(struct ufs_dqblk), 1, qfo); quotactl(fsname, QCMD(Q_SETUSE, type), id, (caddr_t)&dqbuf); fup->fu_curinodes = 0; @@ -384,7 +384,7 @@ update(char *fsname, char *quotafile, int type) fclose(qfi); fflush(qfo); ftruncate(fileno(qfo), - (off_t)((highid[type] + 1) * sizeof(struct dqblk))); + (off_t)((highid[type] + 1) * sizeof(struct ufs_dqblk))); fclose(qfo); return (0); } @@ -511,15 +511,15 @@ addid(u_long id, int type, char *name) */ ino_t nextino, lastinum; long readcnt, readpercg, fullcnt, inobufsize, partialcnt, partialsize; -struct dinode *inodebuf; +struct ufs1_dinode *inodebuf; #define INOBUFSIZE 56*1024 /* size of buffer to read inodes */ -struct dinode * +struct ufs1_dinode * getnextinode(ino_t inumber) { long size; daddr_t dblk; - static struct dinode *dp; + static struct ufs1_dinode *dp; if (inumber != nextino++ || inumber > maxino) errx(1, "bad inode number %d to nextinode", inumber); @@ -550,10 +550,10 @@ resetinodebuf(void) lastinum = 0; readcnt = 0; inobufsize = blkroundup(&sblock, INOBUFSIZE); - fullcnt = inobufsize / sizeof(struct dinode); + fullcnt = inobufsize / sizeof(struct ufs1_dinode); readpercg = sblock.fs_ipg / fullcnt; partialcnt = sblock.fs_ipg % fullcnt; - partialsize = partialcnt * sizeof(struct dinode); + partialsize = partialcnt * sizeof(struct ufs1_dinode); if (partialcnt != 0) { readpercg++; } else { diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index 074e2d1c80..a04f1aa2ca 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -37,7 +37,7 @@ * * @(#)dirs.c 8.7 (Berkeley) 5/1/95 * $FreeBSD: src/sbin/restore/dirs.c,v 1.14.2.5 2001/10/15 13:44:45 dd Exp $ - * $DragonFly: src/sbin/restore/dirs.c,v 1.9 2005/11/06 12:49:25 swildner Exp $ + * $DragonFly: src/sbin/restore/dirs.c,v 1.10 2006/04/03 01:58:49 dillon Exp $ */ #include @@ -116,7 +116,7 @@ struct odirect { char d_name[ODIRSIZ]; }; -static struct inotab *allocinotab(ufs1_ino_t, struct dinode *, long); +static struct inotab *allocinotab(ufs1_ino_t, struct ufs1_dinode *, long); static void dcvt(struct odirect *, struct direct *); static void flushent(void); static struct inotab *inotablookup(ufs1_ino_t); @@ -137,7 +137,7 @@ void extractdirs(int genmode) { int i; - struct dinode *ip; + struct ufs1_dinode *ip; struct inotab *itp; struct direct nulldir; int fd; @@ -688,7 +688,7 @@ inodetype(ufs1_ino_t ino) * If requested, save its pertinent mode, owner, and time info. */ static struct inotab * -allocinotab(ufs1_ino_t ino, struct dinode *dip, long seekpt) +allocinotab(ufs1_ino_t ino, struct ufs1_dinode *dip, long seekpt) { struct inotab *itp; struct modeinfo node; diff --git a/sbin/restore/restore.h b/sbin/restore/restore.h index 4db423944a..957589fe0a 100644 --- a/sbin/restore/restore.h +++ b/sbin/restore/restore.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)restore.h 8.3 (Berkeley) 9/13/94 - * $DragonFly: src/sbin/restore/restore.h,v 1.2 2005/08/28 04:35:14 dillon Exp $ + * $DragonFly: src/sbin/restore/restore.h,v 1.3 2006/04/03 01:58:49 dillon Exp $ */ /* @@ -108,7 +108,7 @@ struct entry { struct context { char *name; /* name of file */ ufs1_ino_t ino; /* inumber of file */ - struct dinode *dip; /* pointer to inode */ + struct ufs1_dinode *dip; /* pointer to inode */ char action; /* action being taken on this file */ } curfile; /* actions */ diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 633f992287..ef63a9d606 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)tunefs.c 8.2 (Berkeley) 4/19/94 * $FreeBSD: src/sbin/tunefs/tunefs.c,v 1.11.2.5 2001/10/14 21:50:39 iedowse Exp $ - * $DragonFly: src/sbin/tunefs/tunefs.c,v 1.6 2004/12/18 21:43:46 swildner Exp $ + * $DragonFly: src/sbin/tunefs/tunefs.c,v 1.7 2006/04/03 01:58:49 dillon Exp $ */ /* @@ -43,6 +43,7 @@ #include #include +#include #include #include diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index 565fa181f5..731edf0430 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -36,7 +36,7 @@ * @(#) Copyright (c) 1980, 1990, 1993 The Regents of the University of California. All rights reserved. * @(#)edquota.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.sbin/edquota/edquota.c,v 1.9.2.6 2002/10/31 22:38:43 iedowse Exp $ - * $DragonFly: src/usr.sbin/edquota/edquota.c,v 1.7 2004/08/30 19:27:21 eirikn Exp $ + * $DragonFly: src/usr.sbin/edquota/edquota.c,v 1.8 2006/04/03 01:58:49 dillon Exp $ */ /* @@ -68,7 +68,7 @@ char tmpfil[] = _PATH_TMP; struct quotause { struct quotause *next; long flags; - struct dqblk dqblk; + struct ufs_dqblk dqblk; char fsname[MAXPATHLEN + 1]; char qfname[1]; /* actually longer */ }; @@ -361,18 +361,18 @@ getprivs(long id, int quotatype, char *fspath) getentry(quotagroup, GRPQUOTA)); fchmod(fd, 0640); } - lseek(fd, (long)(id * sizeof(struct dqblk)), L_SET); - switch (read(fd, &qup->dqblk, sizeof(struct dqblk))) { + lseek(fd, (long)(id * sizeof(struct ufs_dqblk)), L_SET); + switch (read(fd, &qup->dqblk, sizeof(struct ufs_dqblk))) { case 0: /* EOF */ /* * Convert implicit 0 quota (EOF) * into an explicit one (zero'ed dqblk) */ bzero((caddr_t)&qup->dqblk, - sizeof(struct dqblk)); + sizeof(struct ufs_dqblk)); break; - case sizeof(struct dqblk): /* OK */ + case sizeof(struct ufs_dqblk): /* OK */ break; default: /* ERROR */ @@ -412,9 +412,9 @@ putprivs(long id, int quotatype, struct quotause *quplist) if ((fd = open(qup->qfname, O_WRONLY)) < 0) { warn("%s", qup->qfname); } else { - lseek(fd, (long)id * (long)sizeof(struct dqblk), 0); - if (write(fd, &qup->dqblk, sizeof(struct dqblk)) != - sizeof(struct dqblk)) { + lseek(fd, (long)id * (long)sizeof(struct ufs_dqblk), 0); + if (write(fd, &qup->dqblk, sizeof(struct ufs_dqblk)) != + sizeof(struct ufs_dqblk)) { warn("%s", qup->qfname); } close(fd); @@ -506,7 +506,7 @@ readprivs(struct quotause *quplist, char *inname) unsigned long ihardlimit, isoftlimit, curinodes; int cnt; char *cp; - struct dqblk dqblk; + struct ufs_dqblk dqblk; char *fsp, line1[BUFSIZ], line2[BUFSIZ]; fd = fopen(inname, "r"); diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index ae7967941d..eefe3cba47 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -29,15 +29,17 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/quot/quot.c,v 1.11.2.4 2002/03/15 18:12:41 mikeh Exp $ - * $DragonFly: src/usr.sbin/quot/quot.c,v 1.5 2005/12/05 02:40:28 swildner Exp $ + * $DragonFly: src/usr.sbin/quot/quot.c,v 1.6 2006/04/03 01:58:49 dillon Exp $ */ #include #include #include + +#include +#include #include #include -#include #include #include @@ -59,9 +61,9 @@ static long blocksize; static char *header; static int headerlen; -static struct dinode *get_inode(int, struct fs *, ino_t); -static int virtualblocks(struct fs *, struct dinode *); -static int isfree(struct dinode *); +static struct ufs1_dinode *get_inode(int, struct fs *, ino_t); +static int virtualblocks(struct fs *, struct ufs1_dinode *); +static int isfree(struct ufs1_dinode *); static void inituser(void); static void usrrehash(void); static struct user *user(uid_t); @@ -92,12 +94,12 @@ static void quot(char *, char *); #endif #define INOCNT(fs) ((fs)->fs_ipg) -#define INOSZ(fs) (sizeof(struct dinode) * INOCNT(fs)) +#define INOSZ(fs) (sizeof(struct ufs1_dinode) * INOCNT(fs)) -static struct dinode * +static struct ufs1_dinode * get_inode(int fd, struct fs *super, ino_t ino) { - static struct dinode *ip; + static struct ufs1_dinode *ip; static ino_t last; if (fd < 0) { /* flush cache */ @@ -110,7 +112,7 @@ get_inode(int fd, struct fs *super, ino_t ino) if (!ip || ino < last || ino >= last + INOCNT(super)) { if (!ip - && !(ip = (struct dinode *)malloc(INOSZ(super)))) + && !(ip = (struct ufs1_dinode *)malloc(INOSZ(super)))) errx(1, "allocate inodes"); last = (ino / INOCNT(super)) * INOCNT(super); if (lseek(fd, (off_t)ino_to_fsba(super, last) << super->fs_fshift, 0) < (off_t)0 @@ -128,7 +130,7 @@ get_inode(int fd, struct fs *super, ino_t ino) #endif static int -virtualblocks(struct fs *super, struct dinode *ip) +virtualblocks(struct fs *super, struct ufs1_dinode *ip) { off_t nblk, sz; @@ -161,7 +163,7 @@ virtualblocks(struct fs *super, struct dinode *ip) } static int -isfree(struct dinode *ip) +isfree(struct ufs1_dinode *ip) { #ifdef COMPAT return (ip->di_mode&IFMT) == 0; @@ -330,7 +332,7 @@ static void dofsizes(int fd, struct fs *super, char *name) { ino_t inode, maxino; - struct dinode *ip; + struct ufs1_dinode *ip; daddr_t sz, ksz; struct fsizes *fp, **fsp; int i; @@ -402,7 +404,7 @@ douser(int fd, struct fs *super, char *name) { ino_t inode, maxino; struct user *usr, *usrs; - struct dinode *ip; + struct ufs1_dinode *ip; int n; maxino = super->fs_ncg * super->fs_ipg - 1; @@ -443,7 +445,7 @@ donames(int fd, struct fs *super, char *name) int c; ino_t inode, inode1; ino_t maxino; - struct dinode *ip; + struct ufs1_dinode *ip; maxino = super->fs_ncg * super->fs_ipg - 1; /* first skip the name of the filesystem */ diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c index c90f701f88..aa24251077 100644 --- a/usr.sbin/repquota/repquota.c +++ b/usr.sbin/repquota/repquota.c @@ -36,7 +36,7 @@ * @(#) Copyright (c) 1980, 1990, 1993 The Regents of the University of California. All rights reserved. * @(#)repquota.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.sbin/repquota/repquota.c,v 1.9.2.2 2002/03/15 22:18:25 mikeh Exp $ - * $DragonFly: src/usr.sbin/repquota/repquota.c,v 1.6 2004/08/30 19:27:22 eirikn Exp $ + * $DragonFly: src/usr.sbin/repquota/repquota.c,v 1.7 2006/04/03 01:58:49 dillon Exp $ */ /* @@ -74,7 +74,7 @@ const char *qfextension[] = INITQFNAMES; struct fileusage { struct fileusage *fu_next; - struct dqblk fu_dqblk; + struct ufs_dqblk fu_dqblk; u_long fu_id; char fu_name[1]; /* actually bigger */ @@ -185,8 +185,8 @@ repquota(struct fstab *fs, int type, char *qfpathname) struct fileusage *fup; FILE *qf; u_long id; - struct dqblk dqbuf; - static struct dqblk zerodqblk; + struct ufs_dqblk dqbuf; + static struct ufs_dqblk zerodqblk; static int warned = 0; static int multiple = 0; @@ -206,7 +206,7 @@ repquota(struct fstab *fs, int type, char *qfpathname) return (1); } for (id = 0; ; id++) { - fread(&dqbuf, sizeof(struct dqblk), 1, qf); + fread(&dqbuf, sizeof(struct ufs_dqblk), 1, qf); if (feof(qf)) break; if (dqbuf.dqb_curinodes == 0 && dqbuf.dqb_curblocks == 0) -- 2.11.4.GIT