Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/fsck_ext2fs Kill __P(), ANSIfy, remove main() prototype...



details:   https://anonhg.NetBSD.org/src/rev/cab60711dbbf
branches:  trunk
changeset: 573106:cab60711dbbf
user:      xtraeme <xtraeme%NetBSD.org@localhost>
date:      Wed Jan 19 19:31:28 2005 +0000

description:
Kill __P(), ANSIfy, remove main() prototype; WARNS=2

diffstat:

 sbin/fsck_ext2fs/Makefile    |   3 +-
 sbin/fsck_ext2fs/dir.c       |  80 +++++++++++------------------------
 sbin/fsck_ext2fs/extern.h    |  96 ++++++++++++++++++++++----------------------
 sbin/fsck_ext2fs/fsck.h      |  18 ++++----
 sbin/fsck_ext2fs/inode.c     |  66 +++++++++--------------------
 sbin/fsck_ext2fs/main.c      |  28 ++++--------
 sbin/fsck_ext2fs/pass1.c     |  15 ++----
 sbin/fsck_ext2fs/pass1b.c    |  13 ++---
 sbin/fsck_ext2fs/pass2.c     |  16 +++----
 sbin/fsck_ext2fs/pass3.c     |   6 +-
 sbin/fsck_ext2fs/pass4.c     |   9 +--
 sbin/fsck_ext2fs/pass5.c     |  12 ++---
 sbin/fsck_ext2fs/preen.c     |  32 +++++---------
 sbin/fsck_ext2fs/setup.c     |  37 +++++-----------
 sbin/fsck_ext2fs/utilities.c |  69 +++++++++----------------------
 15 files changed, 190 insertions(+), 310 deletions(-)

diffs (truncated from 1321 to 300 lines):

diff -r 93b06ff4d7c4 -r cab60711dbbf sbin/fsck_ext2fs/Makefile
--- a/sbin/fsck_ext2fs/Makefile Wed Jan 19 19:13:38 2005 +0000
+++ b/sbin/fsck_ext2fs/Makefile Wed Jan 19 19:31:28 2005 +0000
@@ -1,8 +1,9 @@
-#      $NetBSD: Makefile,v 1.9 2002/08/19 10:16:53 lukem Exp $
+#      $NetBSD: Makefile,v 1.10 2005/01/19 19:31:28 xtraeme Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/5/93
 
 .include <bsd.own.mk>
 
+WARNS= 2
 PROG=  fsck_ext2fs
 MAN=    fsck_ext2fs.8
 SRCS=  dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
diff -r 93b06ff4d7c4 -r cab60711dbbf sbin/fsck_ext2fs/dir.c
--- a/sbin/fsck_ext2fs/dir.c    Wed Jan 19 19:13:38 2005 +0000
+++ b/sbin/fsck_ext2fs/dir.c    Wed Jan 19 19:31:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.11 2004/03/22 19:46:53 bouyer Exp $  */
+/*     $NetBSD: dir.c,v 1.12 2005/01/19 19:31:28 xtraeme Exp $ */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)dir.c      8.5 (Berkeley) 12/8/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.11 2004/03/22 19:46:53 bouyer Exp $");
+__RCSID("$NetBSD: dir.c,v 1.12 2005/01/19 19:31:28 xtraeme Exp $");
 #endif
 #endif /* not lint */
 
@@ -93,19 +93,19 @@
 };
 #undef DIRBLKSIZ
 
-static int expanddir __P((struct ext2fs_dinode *, char *));
-static void freedir __P((ino_t, ino_t));
-static struct ext2fs_direct *fsck_readdir __P((struct inodesc *));
-static struct bufarea *getdirblk __P((daddr_t, long));
-static int lftempname __P((char *, ino_t));
-static int mkentry __P((struct inodesc *));
-static int chgino __P((struct  inodesc *));
+static int expanddir(struct ext2fs_dinode *, char *);
+static void freedir(ino_t, ino_t);
+static struct ext2fs_direct *fsck_readdir(struct inodesc *);
+static struct bufarea *getdirblk(daddr_t, long);
+static int lftempname(char *, ino_t);
+static int mkentry(struct inodesc *);
+static int chgino(struct  inodesc *);
 
 /*
  * Propagate connected state through the tree.
  */
 void
-propagate()
+propagate(void)
 {
        struct inoinfo **inpp, *inp, *pinp;
        struct inoinfo **inpend;
@@ -141,8 +141,7 @@
  * Scan each entry in a directory block.
  */
 int
-dirscan(idesc)
-       struct inodesc *idesc;
+dirscan(struct inodesc *idesc)
 {
        struct ext2fs_direct *dp;
        struct bufarea *bp;
@@ -190,8 +189,7 @@
  * get next entry in a directory.
  */
 static struct ext2fs_direct *
-fsck_readdir(idesc)
-       struct inodesc *idesc;
+fsck_readdir(struct inodesc *idesc)
 {
        struct ext2fs_direct *dp, *ndp;
        struct bufarea *bp;
@@ -252,9 +250,7 @@
  * This is a superset of the checks made in the kernel.
  */
 int
-dircheck(idesc, dp)
-       struct inodesc *idesc;
-       struct ext2fs_direct *dp;
+dircheck(struct inodesc *idesc, struct ext2fs_direct *dp)
 {
        int size;
        char *cp;
@@ -285,18 +281,14 @@
 }
 
 void
-direrror(ino, errmesg)
-       ino_t ino;
-       char *errmesg;
+direrror(ino_t ino, char *errmesg)
 {
 
        fileerror(ino, ino, errmesg);
 }
 
 void
-fileerror(cwd, ino, errmesg)
-       ino_t cwd, ino;
-       char *errmesg;
+fileerror(ino_t cwd, ino_t ino, char *errmesg)
 {
        struct ext2fs_dinode *dp;
        char pathbuf[MAXPATHLEN + 1];
@@ -318,9 +310,7 @@
 }
 
 void
-adjust(idesc, lcnt)
-       struct inodesc *idesc;
-       short lcnt;
+adjust(struct inodesc *idesc, short lcnt)
 {
        struct ext2fs_dinode *dp;
 
@@ -349,8 +339,7 @@
 }
 
 static int
-mkentry(idesc)
-       struct inodesc *idesc;
+mkentry(struct inodesc *idesc)
 {
        struct ext2fs_direct *dirp = idesc->id_dirp;
        struct ext2fs_direct newent;
@@ -379,8 +368,7 @@
 }
 
 static int
-chgino(idesc)
-       struct inodesc *idesc;
+chgino(struct inodesc *idesc)
 {
        struct ext2fs_direct *dirp = idesc->id_dirp;
        u_int16_t namlen = dirp->e2d_namlen;
@@ -398,9 +386,7 @@
 }
 
 int
-linkup(orphan, parentdir)
-       ino_t orphan;
-       ino_t parentdir;
+linkup(ino_t orphan, ino_t parentdir)
 {
        struct ext2fs_dinode *dp;
        int lostdir;
@@ -505,10 +491,7 @@
  * fix an entry in a directory.
  */
 int
-changeino(dir, name, newnum)
-       ino_t dir;
-       char *name;
-       ino_t newnum;
+changeino(ino_t dir, char *name, ino_t newnum)
 {
        struct inodesc idesc;
 
@@ -526,9 +509,7 @@
  * make an entry in a directory
  */
 int
-makeentry(parent, ino, name)
-       ino_t parent, ino;
-       char *name;
+makeentry(ino_t parent, ino_t ino, char *name)
 {
        struct ext2fs_dinode *dp;
        struct inodesc idesc;
@@ -564,9 +545,7 @@
  * Attempt to expand the size of a directory
  */
 static int
-expanddir(dp, name)
-       struct ext2fs_dinode *dp;
-       char *name;
+expanddir(struct ext2fs_dinode *dp, char *name)
 {
        daddr_t lastbn, newblk;
        struct bufarea *bp;
@@ -624,9 +603,7 @@
  * allocate a new directory
  */
 int
-allocdir(parent, request, mode)
-       ino_t parent, request;
-       int mode;
+allocdir(ino_t parent, ino_t request, int mode)
 {
        ino_t ino;
        struct ext2fs_dinode *dp;
@@ -686,8 +663,7 @@
  * free a directory inode
  */
 static void
-freedir(ino, parent)
-       ino_t ino, parent;
+freedir(ino_t ino, ino_t parent)
 {
        struct ext2fs_dinode *dp;
 
@@ -703,9 +679,7 @@
  * generate a temporary name for the lost+found directory.
  */
 static int
-lftempname(bufp, ino)
-       char *bufp;
-       ino_t ino;
+lftempname(char *bufp, ino_t ino)
 {
        ino_t in;
        char *cp;
@@ -730,9 +704,7 @@
  * Insure that it is held until another is requested.
  */
 static struct bufarea *
-getdirblk(blkno, size)
-       daddr_t blkno;
-       long size;
+getdirblk(daddr_t blkno, long size)
 {
 
        if (pdirbp != 0)
diff -r 93b06ff4d7c4 -r cab60711dbbf sbin/fsck_ext2fs/extern.h
--- a/sbin/fsck_ext2fs/extern.h Wed Jan 19 19:13:38 2005 +0000
+++ b/sbin/fsck_ext2fs/extern.h Wed Jan 19 19:31:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.3 2003/07/13 08:22:55 itojun Exp $        */
+/*     $NetBSD: extern.h,v 1.4 2005/01/19 19:31:28 xtraeme Exp $       */
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.
@@ -25,51 +25,51 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-void   adjust __P((struct inodesc *, short));
-int    allocblk __P((void));
-int    allocdir __P((ino_t, ino_t, int));
-void   blkerror __P((ino_t, char *, daddr_t));
-int    bread __P((int, char *, daddr_t, long));
-void   bufinit __P((void));
-void   bwrite __P((int, char *, daddr_t, long));
-void   cacheino __P((struct ext2fs_dinode *, ino_t));
-int    changeino __P((ino_t, char *, ino_t));
+void   adjust(struct inodesc *, short);
+int    allocblk(void);
+int    allocdir(ino_t, ino_t, int);
+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 ext2fs_dinode *, ino_t);
+int    changeino(ino_t, char *, ino_t);
 struct fstab;
-int    chkrange __P((daddr_t, int));
-void   ckfini __P((int));
-int    ckinode __P((struct ext2fs_dinode *, struct inodesc *));
-void   clri __P((struct inodesc *, char *, int));
-int    dircheck __P((struct inodesc *, struct ext2fs_direct *));
-void   direrror __P((ino_t, char *));
-int    dirscan __P((struct inodesc *));
-int    dofix __P((struct inodesc *, char *));
-void   fileerror __P((ino_t, ino_t, char *));
-int    findino __P((struct inodesc *));
-int    findname __P((struct inodesc *));
-void   flush __P((int, struct bufarea *));
-void   freeblk __P((daddr_t));
-void   freeino __P((ino_t));
-void   freeinodebuf __P((void));
-int    ftypeok __P((struct ext2fs_dinode *));
-void   getpathname __P((char *, size_t, ino_t, ino_t));
-void   inocleanup __P((void));
-void   inodirty __P((void));
-int    linkup __P((ino_t, ino_t));
-int    makeentry __P((ino_t, ino_t, char *));
-void   pass1 __P((void));
-void   pass1b __P((void));
-void   pass2 __P((void));
-void   pass3 __P((void));
-void   pass4 __P((void));
-int    pass1check __P((struct inodesc *));
-int    pass4check __P((struct inodesc *));
-void   pass5 __P((void));
-void   pinode __P((ino_t));
-void   propagate __P((void));
-int    reply __P((char *));
-void   resetinodebuf __P((void));
-int    setup __P((const char *));
-struct ext2fs_dinode * getnextinode __P((ino_t));
-void   catch __P((int));
-void   catchquit __P((int));



Home | Main Index | Thread Index | Old Index