diff options
30 files changed, 170 insertions, 170 deletions
diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h index 60c064637d5..7ab3a1c0dad 100644 --- a/include/protocols/dumprestore.h +++ b/include/protocols/dumprestore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dumprestore.h,v 1.5 2003/06/02 19:34:12 millert Exp $ */ +/* $OpenBSD: dumprestore.h,v 1.6 2003/08/25 23:28:34 tedu Exp $ */ /* $NetBSD: dumprestore.h,v 1.6 1994/10/26 00:56:49 cgd Exp $ */ /* @@ -74,7 +74,7 @@ union u_spcl { ino_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, unless c_type is TS_BITS or TS_CLRI. */ diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c index 5f7e9df6baa..a030d5a0f25 100644 --- a/sbin/clri/clri.c +++ b/sbin/clri/clri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clri.c,v 1.8 2003/06/02 20:06:14 millert Exp $ */ +/* $OpenBSD: clri.c,v 1.9 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: clri.c,v 1.9 1995/03/18 14:54:33 cgd Exp $ */ /* @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)clri.c 8.2 (Berkeley) 9/23/93"; #else -static char rcsid[] = "$OpenBSD: clri.c,v 1.8 2003/06/02 20:06:14 millert Exp $"; +static char rcsid[] = "$OpenBSD: clri.c,v 1.9 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -65,9 +65,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)]; int32_t generation; off_t offset; size_t bsize; diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h index ede008236b4..9ad0c7a14e5 100644 --- a/sbin/dump/dump.h +++ b/sbin/dump/dump.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.h,v 1.13 2003/06/02 20:06:14 millert Exp $ */ +/* $OpenBSD: dump.h,v 1.14 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: dump.h,v 1.11 1997/06/05 11:13:20 lukem Exp $ */ /*- @@ -32,7 +32,7 @@ * @(#)dump.h 8.1 (Berkeley) 6/5/93 */ -#define MAXINOPB (MAXBSIZE / sizeof(struct dinode)) +#define MAXINOPB (MAXBSIZE / sizeof(struct ufs1_dinode)) #define MAXNINDIR (MAXBSIZE / sizeof(daddr_t)) /* @@ -98,8 +98,8 @@ void statussig(int); void timeest(void); /* mapping routines */ -struct dinode; -off_t blockest(struct dinode *dp); +struct ufs1_dinode; +off_t blockest(struct ufs1_dinode *dp); void mapfileino(ino_t, off_t *, int *); int mapfiles(ino_t maxino, off_t *tapesize, char *disk, char * const *dirv); int mapdirs(ino_t maxino, off_t *tapesize); @@ -107,7 +107,7 @@ int mapdirs(ino_t maxino, off_t *tapesize); /* file dumping routines */ void blksout(daddr_t *blkp, int frags, ino_t ino); void bread(daddr_t blkno, char *buf, int size); -void dumpino(struct dinode *dp, ino_t ino); +void dumpino(struct ufs1_dinode *dp, ino_t ino); void dumpmap(char *map, int type, ino_t ino); void writeheader(ino_t ino); @@ -124,7 +124,7 @@ void dumpabort(int signo); void getfstab(void); char *rawname(char *cp); -struct dinode *getino(ino_t inum); +struct ufs1_dinode *getino(ino_t inum); /* rdump routines */ #ifdef RDUMP diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 5f43c3e877a..7c10d2d8b85 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.35 2003/07/28 06:13:26 tedu Exp $ */ +/* $OpenBSD: main.c,v 1.36 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: main.c,v 1.14 1997/06/05 11:13:24 lukem Exp $ */ /*- @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 4/15/94"; #else -static const char rcsid[] = "$OpenBSD: main.c,v 1.35 2003/07/28 06:13:26 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: main.c,v 1.36 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -100,7 +100,7 @@ main(int argc, char *argv[]) { 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 6797725a696..8dcad224be7 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traverse.c,v 1.14 2003/07/28 06:13:26 tedu Exp $ */ +/* $OpenBSD: traverse.c,v 1.15 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: traverse.c,v 1.17 1997/06/05 11:13:27 lukem Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)traverse.c 8.2 (Berkeley) 9/23/93"; #else -static const char rcsid[] = "$OpenBSD: traverse.c,v 1.14 2003/07/28 06:13:26 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: traverse.c,v 1.15 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -79,7 +79,7 @@ static int searchdir(ino_t ino, daddr_t blkno, long size, off_t filesize); * hence the estimate may be high. */ off_t -blockest(struct dinode *dp) +blockest(struct ufs1_dinode *dp) { off_t blkest, sizeest; @@ -130,7 +130,7 @@ void mapfileino(ino_t ino, off_t *tapesize, int *dirskipped) { int mode; - struct dinode *dp; + struct ufs1_dinode *dp; dp = getino(ino); if ((mode = (dp->di_mode & IFMT)) == 0) @@ -259,7 +259,7 @@ mapfiles(ino_t maxino, off_t *tapesize, char *disk, char * const *dirv) int mapdirs(ino_t maxino, off_t *tapesize) { - struct dinode *dp; + struct ufs1_dinode *dp; int i, isdir; char *map; ino_t ino; @@ -392,7 +392,7 @@ searchdir(ino_t ino, daddr_t blkno, long size, off_t filesize) * Dump the contents of an inode to tape. */ void -dumpino(struct dinode *dp, ino_t ino) +dumpino(struct ufs1_dinode *dp, ino_t ino) { int ind_level, cnt; off_t size; @@ -575,11 +575,11 @@ writeheader(ino) writerec((char *)&spcl, 1); } -struct dinode * +struct ufs1_dinode * getino(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/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c index 6285fc72fd8..355cd87ef5c 100644 --- a/sbin/fsck_ffs/dir.c +++ b/sbin/fsck_ffs/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.15 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: dir.c,v 1.16 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: dir.c,v 1.20 1996/09/27 22:45:11 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dir.c 8.5 (Berkeley) 12/8/94"; #else -static const char rcsid[] = "$OpenBSD: dir.c,v 1.15 2003/06/02 20:06:15 millert Exp $"; +static const char rcsid[] = "$OpenBSD: dir.c,v 1.16 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -64,7 +64,7 @@ struct odirtemplate odirhead = { 0, DIRBLKSIZ - 12, 2, ".." }; -static int expanddir(struct dinode *, char *); +static int expanddir(struct ufs1_dinode *, char *); static void freedir(ino_t, ino_t); static struct direct *fsck_readdir(struct inodesc *); static struct bufarea *getdirblk(daddr_t, long); @@ -273,7 +273,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); @@ -295,7 +295,7 @@ fileerror(ino_t cwd, ino_t ino, char *errmesg) void adjust(struct inodesc *idesc, short lcnt) { - struct dinode *dp; + struct ufs1_dinode *dp; dp = ginode(idesc->id_number); if (dp->di_nlink == lcnt) { @@ -384,7 +384,7 @@ chgino(struct inodesc *idesc) int linkup(ino_t orphan, ino_t parentdir) { - struct dinode *dp; + struct ufs1_dinode *dp; int lostdir; ino_t oldlfdir; struct inodesc idesc; @@ -519,7 +519,7 @@ changeino(dir, name, 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]; @@ -551,7 +551,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) { daddr_t lastbn, newblk; struct bufarea *bp; @@ -610,7 +610,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; struct inoinfo *inp; @@ -666,7 +666,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_ffs/extern.h b/sbin/fsck_ffs/extern.h index 2f971986c88..e3752b54a01 100644 --- a/sbin/fsck_ffs/extern.h +++ b/sbin/fsck_ffs/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.7 2003/04/26 00:39:28 deraadt Exp $ */ +/* $OpenBSD: extern.h,v 1.8 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: extern.h,v 1.6 1996/09/27 22:45:12 christos Exp $ */ /* @@ -32,12 +32,12 @@ void blkerror(ino_t, char *, daddr_t); int bread(int, char *, daddr_t, long); void bufinit(void); void bwrite(int, char *, daddr_t, long); -void cacheino(struct dinode *, ino_t); +void cacheino(struct ufs1_dinode *, ino_t); int changeino(ino_t, char *, ino_t); struct fstab; int chkrange(daddr_t, int); void ckfini(int); -int ckinode(struct dinode *, struct inodesc *); +int ckinode(struct ufs1_dinode *, struct inodesc *); void clri(struct inodesc *, char *, int); int dircheck(struct inodesc *, struct direct *); void direrror(ino_t, char *); @@ -50,7 +50,7 @@ void flush(int, struct bufarea *); void freeblk(daddr_t, long); void freeino(ino_t); void freeinodebuf(void); -int ftypeok(struct dinode *); +int ftypeok(struct ufs1_dinode *); void getpathname(char *, size_t, ino_t, ino_t); void inocleanup(void); void inodirty(void); @@ -69,7 +69,7 @@ void propagate(ino_t); int reply(char *); void resetinodebuf(void); int setup(char *); -struct dinode * getnextinode(ino_t); +struct ufs1_dinode * getnextinode(ino_t); void catch(int); void catchquit(int); void voidquit(int); diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index df946568117..74c4cb4638a 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fsck.h,v 1.12 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: fsck.h,v 1.13 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: fsck.h,v 1.13 1996/10/11 20:15:46 thorpej Exp $ */ /* @@ -63,7 +63,7 @@ struct bufarea { 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; }; @@ -198,7 +198,7 @@ daddr_t n_blks; /* number of blocks in use */ daddr_t n_files; /* number of files in use */ #define clearinode(dp) (*(dp) = zino) -struct dinode zino; +struct ufs1_dinode zino; #define setbmap(blkno) setbit(blockmap, blkno) #define testbmap(blkno) isset(blockmap, blkno) @@ -210,7 +210,7 @@ struct dinode zino; #define ALTERED 0x08 #define FOUND 0x10 -struct dinode *ginode(ino_t); +struct ufs1_dinode *ginode(ino_t); struct inoinfo *getinoinfo(ino_t); void getblk(struct bufarea *, daddr_t, long); ino_t allocino(ino_t, int); diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index caa6f00c8ce..2d06db6772b 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inode.c,v 1.23 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: inode.c,v 1.24 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: inode.c,v 1.23 1996/10/11 20:15:47 thorpej Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)inode.c 8.5 (Berkeley) 2/8/95"; #else -static const char rcsid[] = "$OpenBSD: inode.c,v 1.23 2003/06/02 20:06:15 millert Exp $"; +static const char rcsid[] = "$OpenBSD: inode.c,v 1.24 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -59,11 +59,11 @@ static ino_t startinum; static int iblock(struct inodesc *, long, u_int64_t); int -ckinode(struct dinode *dp, struct inodesc *idesc) +ckinode(struct ufs1_dinode *dp, struct inodesc *idesc) { ufs_daddr_t *ap; long ret, n, ndb, offset; - struct dinode dino; + struct ufs1_dinode dino; u_int64_t remsize, sizepb; mode_t mode; char pathbuf[MAXPATHLEN + 1]; @@ -156,7 +156,7 @@ iblock(struct inodesc *idesc, long ilevel, u_int64_t isize) u_int64_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; @@ -266,7 +266,7 @@ chkrange(daddr_t blk, int cnt) /* * General purpose interface for reading inodes. */ -struct dinode * +struct ufs1_dinode * ginode(ino_t inumber) { daddr_t iblk; @@ -290,14 +290,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; daddr_t dblk; - static struct dinode *dp; + static struct ufs1_dinode *dp; if (inumber != nextino++ || inumber > maxino) errexit("bad inode number %d to nextinode\n", inumber); @@ -326,10 +326,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 { @@ -360,7 +360,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; @@ -438,7 +438,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) { @@ -486,7 +486,7 @@ findino(struct inodesc *idesc) void pinode(ino_t ino) { - struct dinode *dp; + struct ufs1_dinode *dp; char *p; struct passwd *pw; time_t t; @@ -544,7 +544,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; time_t t; @@ -605,7 +605,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_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index 873be4d5571..b1d25aa6b9f 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass1.c,v 1.13 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: pass1.c,v 1.14 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass1.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: pass1.c,v 1.13 2003/06/02 20:06:15 millert Exp $"; +static const char rcsid[] = "$OpenBSD: pass1.c,v 1.14 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -114,7 +114,7 @@ pass1(void) static void checkinode(ino_t inumber, struct inodesc *idesc) { - struct dinode *dp; + struct ufs1_dinode *dp; struct zlncnt *zlnp; int ndb, j; mode_t mode; diff --git a/sbin/fsck_ffs/pass1b.c b/sbin/fsck_ffs/pass1b.c index 053803029aa..552528d6c6e 100644 --- a/sbin/fsck_ffs/pass1b.c +++ b/sbin/fsck_ffs/pass1b.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass1b.c,v 1.8 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: pass1b.c,v 1.9 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: pass1b.c,v 1.10 1996/09/23 16:18:37 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass1b.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: pass1b.c,v 1.8 2003/06/02 20:06:15 millert Exp $"; +static const char rcsid[] = "$OpenBSD: pass1b.c,v 1.9 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -64,7 +64,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_ffs/pass2.c b/sbin/fsck_ffs/pass2.c index 107526f3ab3..6f82b3c2055 100644 --- a/sbin/fsck_ffs/pass2.c +++ b/sbin/fsck_ffs/pass2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass2.c,v 1.17 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: pass2.c,v 1.18 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: pass2.c,v 1.17 1996/09/27 22:45:15 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass2.c 8.6 (Berkeley) 10/27/94"; #else -static const char rcsid[] = "$OpenBSD: pass2.c,v 1.17 2003/06/02 20:06:15 millert Exp $"; +static const char rcsid[] = "$OpenBSD: pass2.c,v 1.18 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -77,11 +77,11 @@ pass2_info2(char *buf, int buflen) void pass2(void) { - struct dinode *dp; + struct ufs1_dinode *dp; struct inoinfo **inpp, *inp, *pinp; struct inoinfo **inpend; struct inodesc curino; - struct dinode dino; + struct ufs1_dinode dino; char pathbuf[MAXPATHLEN + 1]; switch (statemap[ROOTINO]) { @@ -187,7 +187,7 @@ pass2(void) inodirty(); } } - memset(&dino, 0, sizeof(struct dinode)); + memset(&dino, 0, sizeof(struct ufs1_dinode)); dino.di_mode = IFDIR; dino.di_size = inp->i_isize; memcpy(&dino.di_db[0], &inp->i_blks[0], (size_t)inp->i_numblks); @@ -254,7 +254,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_ffs/pass4.c b/sbin/fsck_ffs/pass4.c index 981ae7282e1..4fac965705d 100644 --- a/sbin/fsck_ffs/pass4.c +++ b/sbin/fsck_ffs/pass4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass4.c,v 1.8 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: pass4.c,v 1.9 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: pass4.c,v 1.11 1996/09/27 22:45:17 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass4.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: pass4.c,v 1.8 2003/06/02 20:06:15 millert Exp $"; +static const char rcsid[] = "$OpenBSD: pass4.c,v 1.9 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -64,7 +64,7 @@ pass4(void) { ino_t inumber; struct zlncnt *zlnp; - struct dinode *dp; + struct ufs1_dinode *dp; struct inodesc idesc; int n; diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c index 67cb63e0672..9a0be2e4233 100644 --- a/sbin/fsck_ffs/utilities.c +++ b/sbin/fsck_ffs/utilities.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utilities.c,v 1.19 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: utilities.c,v 1.20 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: utilities.c,v 1.19 2003/06/02 20:06:15 millert Exp $"; +static const char rcsid[] = "$OpenBSD: utilities.c,v 1.20 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -63,7 +63,7 @@ long diskreads, totalreads; /* Disk cache statistics */ static void rwerror(char *, daddr_t); 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 32725b5cebc..3a8bff77efe 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsdb.c,v 1.14 2003/06/26 08:01:54 tedu Exp $ */ +/* $OpenBSD: fsdb.c,v 1.15 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: fsdb.c,v 1.7 1997/01/11 06:50:53 lukem Exp $ */ /*- @@ -38,7 +38,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: fsdb.c,v 1.14 2003/06/26 08:01:54 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: fsdb.c,v 1.15 2003/08/25 23:28:15 tedu Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -80,7 +80,7 @@ static int chnamefunc(struct inodesc *); static int dotime(char *, int32_t *, int32_t *); int returntosingle = 0; -struct dinode *curinode; +struct ufs1_dinode *curinode; ino_t curinum; static void @@ -325,7 +325,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 cfed3d503ed..db42e8f9034 100644 --- a/sbin/fsdb/fsdb.h +++ b/sbin/fsdb/fsdb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fsdb.h,v 1.4 2002/02/16 21:27:35 millert Exp $ */ +/* $OpenBSD: fsdb.h,v 1.5 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: fsdb.h,v 1.4 1996/09/28 19:30:36 christos Exp $ */ /*- @@ -54,12 +54,12 @@ struct cmdtable { unsigned int maxargc; int (*handler)(int argc, char *argv[]); }; -extern struct dinode *curinode; +extern struct ufs1_dinode *curinode; extern ino_t curinum; char **crack(char *, int *); int argcount(struct cmdtable *, int, char *[]); -void printstat(const char *, ino_t, struct dinode *); +void printstat(const char *, ino_t, struct ufs1_dinode *); int checkactive(void); int checkactivedir(void); int printactive(void); diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index 2212df43368..f00bf4d6409 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsdbutil.c,v 1.9 2003/06/11 06:22:13 deraadt Exp $ */ +/* $OpenBSD: fsdbutil.c,v 1.10 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: fsdbutil.c,v 1.5 1996/09/28 19:30:37 christos Exp $ */ /*- @@ -38,7 +38,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fsdbutil.c,v 1.9 2003/06/11 06:22:13 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fsdbutil.c,v 1.10 2003/08/25 23:28:15 tedu Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -94,7 +94,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; diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index 3143b6ae275..5fd052d6b79 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsirand.c,v 1.18 2003/06/17 21:56:24 millert Exp $ */ +/* $OpenBSD: fsirand.c,v 1.19 2003/08/25 23:28:15 tedu Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fsirand.c,v 1.18 2003/06/17 21:56:24 millert Exp $"; +static char rcsid[] = "$OpenBSD: fsirand.c,v 1.19 2003/08/25 23:28:15 tedu Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -92,7 +92,7 @@ main(int argc, char *argv[]) int fsirand(char *device) { - static struct dinode *inodebuf; + static struct ufs1_dinode *inodebuf; static size_t oldibufsize; size_t ibufsize; struct fs *sblock, *tmpsblock; @@ -177,7 +177,7 @@ fsirand(char *device) } /* 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 ee4c6d98b60..94495d49c48 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: debug.c,v 1.3 2003/08/07 16:37:52 fgsch Exp $ */ +/* $OpenBSD: debug.c,v 1.4 2003/08/25 23:28:15 tedu Exp $ */ /* * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. @@ -43,7 +43,7 @@ #ifndef lint static const char rcsid[] = - "$OpenBSD: debug.c,v 1.3 2003/08/07 16:37:52 fgsch Exp $"; + "$OpenBSD: debug.c,v 1.4 2003/08/25 23:28:15 tedu Exp $"; #endif /* not lint */ /* ********************************************************** INCLUDES ***** */ @@ -599,7 +599,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 0617c13d2f2..d788f905b52 100644 --- a/sbin/growfs/debug.h +++ b/sbin/growfs/debug.h @@ -1,4 +1,4 @@ -/* $OpenBSD: debug.h,v 1.2 2003/08/07 16:37:52 fgsch Exp $ */ +/* $OpenBSD: debug.h,v 1.3 2003/08/25 23:28:15 tedu Exp $ */ /* * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. @@ -54,7 +54,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 6a59e493e9e..784d6832e02 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: growfs.c,v 1.5 2003/08/16 17:31:55 deraadt Exp $ */ +/* $OpenBSD: growfs.c,v 1.6 2003/08/25 23:28:15 tedu Exp $ */ /* * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. @@ -46,7 +46,7 @@ static const char copyright[] = Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ All rights reserved.\n"; -static const char rcsid[] = "$OpenBSD: growfs.c,v 1.5 2003/08/16 17:31:55 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: growfs.c,v 1.6 2003/08/25 23:28:15 tedu Exp $"; #endif /* not lint */ /* ********************************************************** INCLUDES ***** */ @@ -105,7 +105,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 @@ -136,7 +136,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); @@ -404,7 +404,7 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag) acg.cg_cs.cs_nifree--; } for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { - for (j = 0; (unsigned)j < sblock.fs_bsize / sizeof(struct dinode); j++) + for (j = 0; (unsigned)j < sblock.fs_bsize / sizeof(struct ufs1_dinode); j++) zino[j].di_gen = arc4random(); wtfs(fsbtodb(&sblock, cgimin(&sblock, cylno) + i), (size_t)sblock.fs_bsize, zino, fso, Nflag); @@ -1762,17 +1762,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 *)ablk; + pi = (struct ufs1_dinode *)ablk; inumber += (cg * sblock.fs_ipg); if (startinum == 0 || inumber < startinum || inumber >= startinum + INOPB(&sblock)) { @@ -2240,7 +2240,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/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c index 5f894aa9d9f..13ef5056f9c 100644 --- a/sbin/ncheck_ffs/ncheck_ffs.c +++ b/sbin/ncheck_ffs/ncheck_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncheck_ffs.c,v 1.19 2003/07/29 18:38:36 deraadt Exp $ */ +/* $OpenBSD: ncheck_ffs.c,v 1.20 2003/08/25 23:28:15 tedu Exp $ */ /*- * Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> @@ -26,7 +26,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.19 2003/07/29 18:38:36 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.20 2003/08/25 23:28:15 tedu Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -46,7 +46,7 @@ static const char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.19 2003/07/29 18:38:36 d #include <errno.h> #include <err.h> -#define MAXINOPB (MAXBSIZE / sizeof(struct dinode)) +#define MAXINOPB (MAXBSIZE / sizeof(struct ufs1_dinode)) char *disk; /* name of the disk file */ int diskfd; /* disk file descriptor */ @@ -64,12 +64,12 @@ char *format; /* output format */ struct icache_s { ino_t ino; - struct dinode di; + struct ufs1_dinode di; } *icache; int nicache; void addinode(ino_t inum); -struct dinode *getino(ino_t inum); +struct ufs1_dinode *getino(ino_t inum); void findinodes(ino_t); void bread(daddr_t, char *, int); __dead void usage(void); @@ -78,8 +78,8 @@ void dirindir(ino_t, daddr_t, int, long *, const char *); void searchdir(ino_t, daddr_t, long, long, const char *); int matchino(const void *, const void *); int matchcache(const void *, const void *); -void cacheino(ino_t, struct dinode *); -struct dinode *cached(ino_t); +void cacheino(ino_t, struct ufs1_dinode *); +struct ufs1_dinode *cached(ino_t); int main(int, char *[]); char *rawname(char *); void format_entry(const char *, struct direct *); @@ -120,7 +120,7 @@ matchcache(const void *key, const void *val) * Add an inode to the cached entries */ void -cacheino(ino_t ino, struct dinode *ip) +cacheino(ino_t ino, struct ufs1_dinode *ip) { if (nicache) icache = realloc(icache, (nicache + 1) * sizeof(struct icache_s)); @@ -135,7 +135,7 @@ cacheino(ino_t ino, struct dinode *ip) /* * Get a cached inode */ -struct dinode * +struct ufs1_dinode * cached(ino_t ino) { struct icache_s *ic; @@ -154,7 +154,7 @@ void findinodes(ino_t maxino) { ino_t ino; - struct dinode *dp; + struct ufs1_dinode *dp; mode_t mode; for (ino = ROOTINO; ino < maxino; ino++) { @@ -177,12 +177,12 @@ findinodes(ino_t maxino) * Get a specified inode from disk. Attempt to minimize reads to once * per cylinder group */ -struct dinode * +struct ufs1_dinode * getino(ino_t inum) { - static struct dinode *itab = NULL; + static struct ufs1_dinode *itab = NULL; static daddr_t iblk = -1; - struct dinode *ip; + struct ufs1_dinode *ip; if (inum < ROOTINO || inum >= sblock->fs_ncg * sblock->fs_ipg) return NULL; @@ -191,10 +191,10 @@ getino(ino_t inum) if ((inum / sblock->fs_ipg) != iblk || itab == NULL) { iblk = inum / sblock->fs_ipg; if (itab == NULL && - (itab = calloc(sblock->fs_ipg, sizeof(struct dinode))) == NULL) + (itab = calloc(sblock->fs_ipg, sizeof(struct ufs1_dinode))) == NULL) errx(1, "no memory for inodes"); bread(fsbtodb(sblock, cgimin(sblock, iblk)), (char *)itab, - sblock->fs_ipg * sizeof(struct dinode)); + sblock->fs_ipg * sizeof(struct ufs1_dinode)); } return &itab[inum % sblock->fs_ipg]; } @@ -280,7 +280,7 @@ addinode(ino_t ino) void scanonedir(ino_t ino, const char *path) { - struct dinode *dp; + struct ufs1_dinode *dp; long filesize; int i; @@ -341,7 +341,7 @@ searchdir(ino_t ino, daddr_t blkno, long size, long filesize, { char dblk[MAXBSIZE]; struct direct *dp; - struct dinode *di; + struct ufs1_dinode *di; mode_t mode; char *npath; long loc; diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 82c37c5bfb3..23986ba92ed 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkfs.c,v 1.32 2003/07/16 18:02:35 tedu Exp $ */ +/* $OpenBSD: mkfs.c,v 1.33 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)mkfs.c 8.3 (Berkeley) 2/3/94"; #else -static char rcsid[] = "$OpenBSD: mkfs.c,v 1.32 2003/07/16 18:02:35 tedu Exp $"; +static char rcsid[] = "$OpenBSD: mkfs.c,v 1.33 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -70,7 +70,7 @@ static char rcsid[] = "$OpenBSD: mkfs.c,v 1.32 2003/07/16 18:02:35 tedu Exp $"; #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) /* @@ -120,7 +120,7 @@ union cg_u { } *cgun; #define acg cgun->cg -struct dinode *zino; +struct ufs1_dinode *zino; char *buf; int fsi, fso; @@ -131,7 +131,7 @@ void initcg(int, time_t); void wtfs(daddr_t, int, void *); void fsinit(time_t); int makedir(struct direct *, int); -void iput(struct dinode *, ino_t); +void iput(struct ufs1_dinode *, ino_t); void setblock(struct fs *, unsigned char *, int); void clrblock(struct fs *, unsigned char *, int); int isblock(struct fs *, unsigned char *, int); @@ -153,7 +153,7 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo) if ((fsun = (union fs_u *)calloc(1, sizeof (union fs_u))) == 0 || (cgun = (union cg_u *)calloc(1, sizeof (union cg_u))) == 0 || - (zino = (struct dinode *)calloc(1, MAXBSIZE)) == 0 || + (zino = (struct ufs1_dinode *)calloc(1, MAXBSIZE)) == 0 || (buf = (char *)calloc(1, MAXBSIZE)) == 0) { printf("buffer malloc failed\n"); exit(1); @@ -254,7 +254,7 @@ recalc: } 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++; @@ -285,7 +285,7 @@ recalc: /* 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); @@ -741,7 +741,7 @@ initcg(int cylno, time_t utime) acg.cg_cs.cs_nifree--; } for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { - 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 = (u_int32_t)arc4random(); wtfs(fsbtodb(&sblock, cgimin(&sblock, cylno) + i), sblock.fs_bsize, (char *)zino); @@ -830,7 +830,7 @@ initcg(int cylno, time_t utime) /* * initialize the file system */ -struct dinode node; +struct ufs1_dinode node; #ifdef LOSTDIR #define PREDEFDIR 3 @@ -1003,9 +1003,9 @@ goth: * Allocate an inode on the disk */ void -iput(struct dinode *ip, ino_t ino) +iput(struct ufs1_dinode *ip, ino_t ino) { - struct dinode buf[MAXINOPB]; + struct ufs1_dinode buf[MAXINOPB]; daddr_t d; int c; diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c index 05966927d63..1335b2dd575 100644 --- a/sbin/quotacheck/quotacheck.c +++ b/sbin/quotacheck/quotacheck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quotacheck.c,v 1.18 2003/06/02 20:06:16 millert Exp $ */ +/* $OpenBSD: quotacheck.c,v 1.19 2003/08/25 23:28:15 tedu Exp $ */ /* $NetBSD: quotacheck.c,v 1.12 1996/03/30 22:34:25 mark Exp $ */ /* @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)quotacheck.c 8.3 (Berkeley) 1/29/94"; #else -static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.18 2003/06/02 20:06:16 millert Exp $"; +static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.19 2003/08/25 23:28:15 tedu Exp $"; #endif #endif /* not lint */ @@ -113,7 +113,7 @@ char *blockcheck(char *); void bread(daddr_t, char *, long); int chkquota(const char *, const char *, const char *, void *, pid_t *); void freeinodebuf(void); -struct dinode * +struct ufs1_dinode * getnextinode(ino_t); int getquotagid(void); int hasquota(struct fstab *, int, char **); @@ -256,7 +256,7 @@ chkquota(const char *vfstype, const char *fsname, const char *mntpt, { struct quotaname *qnp = auxarg; struct fileusage *fup; - struct dinode *dp; + struct ufs1_dinode *dp; int cg, i, mode, errs = 0, status; ino_t ino; pid_t pid; @@ -559,15 +559,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) err(1, "bad inode number %d to nextinode", inumber); @@ -598,10 +598,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 36ccf1f7102..533e9cbee8c 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dirs.c,v 1.25 2003/07/29 18:38:36 deraadt Exp $ */ +/* $OpenBSD: dirs.c,v 1.26 2003/08/25 23:28:16 tedu Exp $ */ /* $NetBSD: dirs.c,v 1.26 1997/07/01 05:37:49 lukem Exp $ */ /* @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)dirs.c 8.5 (Berkeley) 8/31/94"; #else -static const char rcsid[] = "$OpenBSD: dirs.c,v 1.25 2003/07/29 18:38:36 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: dirs.c,v 1.26 2003/08/25 23:28:16 tedu Exp $"; #endif #endif /* not lint */ @@ -121,7 +121,7 @@ struct odirect { char d_name[ODIRSIZ]; }; -static struct inotab *allocinotab(ino_t, struct dinode *, long); +static struct inotab *allocinotab(ino_t, struct ufs1_dinode *, long); static void dcvt(struct odirect *, struct direct *); static void flushent(void); static struct inotab *inotablookup(ino_t); @@ -143,7 +143,7 @@ extractdirs(genmode) int genmode; { int i; - struct dinode *ip; + struct ufs1_dinode *ip; struct inotab *itp; struct direct nulldir; int fd; @@ -705,7 +705,7 @@ inodetype(ino) static struct inotab * allocinotab(ino, dip, seekpt) ino_t ino; - struct dinode *dip; + struct ufs1_dinode *dip; long seekpt; { struct inotab *itp; diff --git a/sbin/restore/restore.h b/sbin/restore/restore.h index b8e0c3612b6..a40fbd36a45 100644 --- a/sbin/restore/restore.h +++ b/sbin/restore/restore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: restore.h,v 1.4 2003/06/02 20:06:16 millert Exp $ */ +/* $OpenBSD: restore.h,v 1.5 2003/08/25 23:28:16 tedu Exp $ */ /* $NetBSD: restore.h,v 1.8 1997/07/01 05:37:54 lukem Exp $ */ /* @@ -107,7 +107,7 @@ struct entry { struct context { char *name; /* name of file */ 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/sys/arch/alpha/stand/installboot.c b/sys/arch/alpha/stand/installboot.c index b154692528e..a25e8eb4940 100644 --- a/sys/arch/alpha/stand/installboot.c +++ b/sys/arch/alpha/stand/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.11 2002/03/14 01:26:27 millert Exp $ */ +/* $OpenBSD: installboot.c,v 1.12 2003/08/25 23:27:43 tedu Exp $ */ /* $NetBSD: installboot.c,v 1.2 1997/04/06 08:41:12 cgd Exp $ */ /* @@ -339,7 +339,7 @@ loadblocknums(boot, devfd, partoffset) struct fs *fs; char *buf; daddr_t blk, *ap; - struct dinode *ip; + struct ufs1_dinode *ip; int ndb; int32_t cksum; @@ -401,7 +401,7 @@ loadblocknums(boot, devfd, partoffset) blk = fsbtodb(fs, ino_to_fsba(fs, statbuf.st_ino)); devread(devfd, buf, blk + partoffset, fs->fs_bsize, "inode"); - ip = (struct dinode *)(buf) + ino_to_fsbo(fs, statbuf.st_ino); + ip = (struct ufs1_dinode *)(buf) + ino_to_fsbo(fs, statbuf.st_ino); /* * Register filesystem block size. diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c index 2ea0d8ec856..fa9b0e1f069 100644 --- a/sys/arch/i386/stand/installboot/installboot.c +++ b/sys/arch/i386/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.40 2003/08/15 21:17:27 deraadt Exp $ */ +/* $OpenBSD: installboot.c,v 1.41 2003/08/25 23:27:43 tedu Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -378,7 +378,7 @@ loadblocknums(char *boot, int devfd, struct disklabel *dl) struct fs *fs; char *buf; daddr_t blk, *ap; - struct dinode *ip; + struct ufs1_dinode *ip; int ndb; u_int8_t *bt; int mib[4]; @@ -454,7 +454,7 @@ loadblocknums(char *boot, int devfd, struct disklabel *dl) blk = fsbtodb(fs, ino_to_fsba(fs, statbuf.st_ino)); devread(devfd, buf, pl->p_offset + blk, fs->fs_bsize, "inode"); - ip = (struct dinode *)(buf) + ino_to_fsbo(fs, statbuf.st_ino); + ip = (struct ufs1_dinode *)(buf) + ino_to_fsbo(fs, statbuf.st_ino); /* * Have the inode. Figure out how many blocks we need. diff --git a/sys/lib/libsa/ufs.c b/sys/lib/libsa/ufs.c index 196b2f2f53c..863dcd1489e 100644 --- a/sys/lib/libsa/ufs.c +++ b/sys/lib/libsa/ufs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs.c,v 1.16 2003/08/11 06:23:09 deraadt Exp $ */ +/* $OpenBSD: ufs.c,v 1.17 2003/08/25 23:27:44 tedu Exp $ */ /* $NetBSD: ufs.c,v 1.16 1996/09/30 16:01:22 ws Exp $ */ /*- @@ -80,7 +80,7 @@ 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 */ @@ -130,9 +130,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/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 56aaa239df0..3641ce0ac4c 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quot.c,v 1.13 2003/06/26 19:47:09 deraadt Exp $ */ +/* $OpenBSD: quot.c,v 1.14 2003/08/25 23:28:16 tedu Exp $ */ /* $NetBSD: quot.c,v 1.7.4.1 1996/05/31 18:06:36 jtc Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: quot.c,v 1.13 2003/06/26 19:47:09 deraadt Exp $"; +static char rcsid[] = "$Id: quot.c,v 1.14 2003/08/25 23:28:16 tedu Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -78,12 +78,12 @@ static int headerlen; #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 */ @@ -95,7 +95,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)))) + if (!ip && !(ip = (struct ufs1_dinode *)malloc(INOSZ(super)))) err(1, "allocate inodes"); last = (ino / INOCNT(super)) * INOCNT(super); if (lseek(fd, @@ -116,7 +116,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; @@ -148,7 +148,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; @@ -311,7 +311,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; @@ -383,7 +383,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; @@ -423,7 +423,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 */ |