Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_ffs Kill __P(), ANSIfy and WARNS=2
details: https://anonhg.NetBSD.org/src/rev/22aadda6bef8
branches: trunk
changeset: 573103:22aadda6bef8
user: xtraeme <xtraeme%NetBSD.org@localhost>
date: Wed Jan 19 17:33:58 2005 +0000
description:
Kill __P(), ANSIfy and WARNS=2
diffstat:
sbin/fsck_ffs/Makefile | 3 +-
sbin/fsck_ffs/dir.c | 89 +++++++++++-----------------------
sbin/fsck_ffs/extern.h | 120 +++++++++++++++++++++++-----------------------
sbin/fsck_ffs/fsck.h | 10 +-
sbin/fsck_ffs/inode.c | 72 ++++++++------------------
sbin/fsck_ffs/main.c | 29 +++-------
sbin/fsck_ffs/pass1.c | 15 ++---
sbin/fsck_ffs/pass1b.c | 11 +--
sbin/fsck_ffs/pass2.c | 16 ++---
sbin/fsck_ffs/pass4.c | 9 +-
sbin/fsck_ffs/pass5.c | 10 +--
sbin/fsck_ffs/setup.c | 29 +++-------
sbin/fsck_ffs/utilities.c | 73 ++++++++-------------------
13 files changed, 184 insertions(+), 302 deletions(-)
diffs (truncated from 1240 to 300 lines):
diff -r 6ccb3cbb764e -r 22aadda6bef8 sbin/fsck_ffs/Makefile
--- a/sbin/fsck_ffs/Makefile Wed Jan 19 16:42:14 2005 +0000
+++ b/sbin/fsck_ffs/Makefile Wed Jan 19 17:33:58 2005 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.26 2005/01/13 19:56:02 christos Exp $
+# $NetBSD: Makefile,v 1.27 2005/01/19 17:33:58 xtraeme Exp $
# @(#)Makefile 8.2 (Berkeley) 4/27/95
.include <bsd.own.mk>
+WARNS= 2
PROG= fsck_ffs
MAN= fsck_ffs.8
SRCS= dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
diff -r 6ccb3cbb764e -r 22aadda6bef8 sbin/fsck_ffs/dir.c
--- a/sbin/fsck_ffs/dir.c Wed Jan 19 16:42:14 2005 +0000
+++ b/sbin/fsck_ffs/dir.c Wed Jan 19 17:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.41 2004/10/08 17:29:29 dbj Exp $ */
+/* $NetBSD: dir.c,v 1.42 2005/01/19 17:33:58 xtraeme Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: dir.c,v 1.41 2004/10/08 17:29:29 dbj Exp $");
+__RCSID("$NetBSD: dir.c,v 1.42 2005/01/19 17:33:58 xtraeme Exp $");
#endif
#endif /* not lint */
@@ -67,22 +67,21 @@
0, DIRBLKSIZ - 12, 2, ".."
};
-static int chgino __P((struct inodesc *));
-static int dircheck __P((struct inodesc *, struct direct *));
-static int expanddir __P((union dinode *, char *));
-static void freedir __P((ino_t, ino_t));
-static struct 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 *));
-void reparent __P((ino_t, ino_t));
+static int chgino (struct inodesc *);
+static int dircheck (struct inodesc *, struct direct *);
+static int expanddir (union dinode *, char *);
+static void freedir (ino_t, ino_t);
+static struct direct *fsck_readdir (struct inodesc *);
+static struct bufarea *getdirblk (daddr_t, long);
+static int lftempname (char *, ino_t);
+static int mkentry (struct inodesc *);
+void reparent (ino_t, ino_t);
/*
* Propagate connected state through the tree.
*/
void
-propagate(inumber)
- ino_t inumber;
+propagate(ino_t inumber)
{
struct inoinfo *inp;
@@ -116,8 +115,7 @@
}
void
-reparent(inumber, parent)
- ino_t inumber, parent;
+reparent(ino_t inumber, ino_t parent)
{
struct inoinfo *inp, *pinp;
@@ -133,8 +131,7 @@
* Scan each entry in a directory block.
*/
int
-dirscan(idesc)
- struct inodesc *idesc;
+dirscan(struct inodesc *idesc)
{
struct direct *dp;
struct bufarea *bp;
@@ -230,8 +227,7 @@
* get next entry in a directory.
*/
static struct direct *
-fsck_readdir(idesc)
- struct inodesc *idesc;
+fsck_readdir(struct inodesc *idesc)
{
struct direct *dp, *ndp;
struct bufarea *bp;
@@ -296,9 +292,7 @@
* This is a superset of the checks made in the kernel.
*/
static int
-dircheck(idesc, dp)
- struct inodesc *idesc;
- struct direct *dp;
+dircheck(struct inodesc *idesc, struct direct *dp)
{
int size;
char *cp;
@@ -339,18 +333,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)
{
union dinode *dp;
char pathbuf[MAXPATHLEN + 1];
@@ -375,9 +365,7 @@
}
void
-adjust(idesc, lcnt)
- struct inodesc *idesc;
- short lcnt;
+adjust(struct inodesc *idesc, int lcnt)
{
union dinode *dp;
int16_t nlink;
@@ -438,8 +426,7 @@
}
static int
-mkentry(idesc)
- struct inodesc *idesc;
+mkentry(struct inodesc *idesc)
{
struct direct *dirp = idesc->id_dirp;
struct direct newent;
@@ -486,8 +473,7 @@
}
static int
-chgino(idesc)
- struct inodesc *idesc;
+chgino(struct inodesc *idesc)
{
struct direct *dirp = idesc->id_dirp;
@@ -502,10 +488,7 @@
}
int
-linkup(orphan, parentdir, name)
- ino_t orphan;
- ino_t parentdir;
- char *name;
+linkup(ino_t orphan, ino_t parentdir, char *name)
{
union dinode *dp;
int lostdir;
@@ -632,10 +615,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;
@@ -653,9 +633,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)
{
union dinode *dp;
struct inodesc idesc;
@@ -690,9 +668,7 @@
* Attempt to expand the size of a directory
*/
static int
-expanddir(dp, name)
- union dinode *dp;
- char *name;
+expanddir(union dinode *dp, char *name)
{
daddr_t lastbn, newblk, dirblk;
struct bufarea *bp;
@@ -780,9 +756,7 @@
* allocate a new directory
*/
ino_t
-allocdir(parent, request, mode)
- ino_t parent, request;
- int mode;
+allocdir(ino_t parent, ino_t request, int mode)
{
ino_t ino;
char *cp;
@@ -853,8 +827,7 @@
* free a directory inode
*/
static void
-freedir(ino, parent)
- ino_t ino, parent;
+freedir(ino_t ino, ino_t parent)
{
union dinode *dp;
@@ -870,9 +843,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;
@@ -897,9 +868,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 6ccb3cbb764e -r 22aadda6bef8 sbin/fsck_ffs/extern.h
--- a/sbin/fsck_ffs/extern.h Wed Jan 19 16:42:14 2005 +0000
+++ b/sbin/fsck_ffs/extern.h Wed Jan 19 17:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.19 2004/01/09 19:12:31 dbj Exp $ */
+/* $NetBSD: extern.h,v 1.20 2005/01/19 17:33:58 xtraeme Exp $ */
/*
* Copyright (c) 1994 James A. Jegers
@@ -24,65 +24,65 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-void adjust __P((struct inodesc *, int));
-daddr_t allocblk __P((long));
-ino_t allocdir __P((ino_t, ino_t, int));
-ino_t allocino __P((ino_t request, int type));
-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((union dinode *, ino_t));
-void catch __P((int));
-void catchquit __P((int));
-int changeino __P((ino_t, char *, ino_t));
-int chkrange __P((daddr_t, int));
-void ckfini __P((void));
-int ckinode __P((union dinode *, struct inodesc *));
-int clearentry __P((struct inodesc *));
-void clri __P((struct inodesc *, char *, int));
-int cmpsblks __P((const struct fs *, struct fs *));
-int cmpsblks42 __P((const struct fs *, struct fs *));
-int cmpsblks44 __P((const struct fs *, struct fs *));
-union dinode * getnextinode __P((ino_t));
-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, long));
-void freeino __P((ino_t));
-void freeinodebuf __P((void));
-int ftypeok __P((union dinode *));
-void getblk __P((struct bufarea *, daddr_t, long));
-struct bufarea *getdatablk __P((daddr_t, long));
-struct inoinfo *getinoinfo __P((ino_t));
-union dinode *ginode __P((ino_t));
-void getpathname __P((char *, size_t, ino_t, ino_t));
-void infohandler __P((int sig));
-void inocleanup __P((void));
-void inodirty __P((void));
Home |
Main Index |
Thread Index |
Old Index