diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-11 06:22:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-11 06:22:16 +0000 |
commit | 4e11c004395b80e095e2512274ee143f75b923f2 (patch) | |
tree | 7dd90385c7fc68e56457d473631e3db8896270d2 /sbin/fsck_ext2fs/dir.c | |
parent | 5dd7b59250a41ff74475db0fc6290dc6b029d96d (diff) |
ansification
Diffstat (limited to 'sbin/fsck_ext2fs/dir.c')
-rw-r--r-- | sbin/fsck_ext2fs/dir.c | 64 |
1 files changed, 18 insertions, 46 deletions
diff --git a/sbin/fsck_ext2fs/dir.c b/sbin/fsck_ext2fs/dir.c index 537accf6e9f..13663c0a78c 100644 --- a/sbin/fsck_ext2fs/dir.c +++ b/sbin/fsck_ext2fs/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.10 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: dir.c,v 1.11 2003/06/11 06:22:12 deraadt Exp $ */ /* $NetBSD: dir.c,v 1.5 2000/01/28 16:01:46 bouyer Exp $ */ /* @@ -69,7 +69,7 @@ static int chgino(struct inodesc *); * Propagate connected state through the tree. */ void -propagate() +propagate(void) { struct inoinfo **inpp, *inp, *pinp; struct inoinfo **inpend; @@ -105,8 +105,7 @@ propagate() * Scan each entry in a directory block. */ int -dirscan(idesc) - struct inodesc *idesc; +dirscan(struct inodesc *idesc) { struct ext2fs_direct *dp; struct bufarea *bp; @@ -154,8 +153,7 @@ dirscan(idesc) * 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; @@ -216,9 +214,7 @@ dpok: * 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; @@ -249,18 +245,14 @@ dircheck(idesc, dp) } 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]; @@ -282,9 +274,7 @@ fileerror(cwd, ino, errmesg) } void -adjust(idesc, lcnt) - struct inodesc *idesc; - short lcnt; +adjust(struct inodesc *idesc, short lcnt) { struct ext2fs_dinode *dp; @@ -313,8 +303,7 @@ adjust(idesc, lcnt) } static int -mkentry(idesc) - struct inodesc *idesc; +mkentry(struct inodesc *idesc) { struct ext2fs_direct *dirp = idesc->id_dirp; struct ext2fs_direct newent; @@ -343,8 +332,7 @@ mkentry(idesc) } 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; @@ -362,9 +350,7 @@ chgino(idesc) } int -linkup(orphan, parentdir) - ino_t orphan; - ino_t parentdir; +linkup(ino_t orphan, ino_t parentdir) { struct ext2fs_dinode *dp; int lostdir; @@ -469,10 +455,7 @@ linkup(orphan, parentdir) * 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; @@ -490,9 +473,7 @@ changeino(dir, name, newnum) * 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; @@ -528,9 +509,7 @@ makeentry(parent, ino, name) * 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; @@ -588,9 +567,7 @@ bad: * 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; @@ -650,8 +627,7 @@ allocdir(parent, request, mode) * free a directory inode */ static void -freedir(ino, parent) - ino_t ino, parent; +freedir(ino_t ino, ino_t parent) { struct ext2fs_dinode *dp; @@ -667,9 +643,7 @@ freedir(ino, parent) * 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; @@ -694,9 +668,7 @@ lftempname(bufp, ino) * 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) |