* cleanup for WARNS=1
* deprecate register * cleanup manpage * remove unused docheck() func * prefix hex numbers with '0x' * getopt returns -1 not EOF
This commit is contained in:
parent
4b836889ab
commit
b1db038303
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dir.c,v 1.21 1997/04/21 11:34:37 mrg Exp $ */
|
||||
/* $NetBSD: dir.c,v 1.22 1997/09/14 14:36:29 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dir.c 8.5 (Berkeley) 12/8/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: dir.c,v 1.21 1997/04/21 11:34:37 mrg Exp $";
|
||||
__RCSID("$NetBSD: dir.c,v 1.22 1997/09/14 14:36:29 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -81,7 +82,7 @@ static int chgino __P((struct inodesc *));
|
|||
void
|
||||
propagate()
|
||||
{
|
||||
register struct inoinfo **inpp, *inp, *pinp;
|
||||
struct inoinfo **inpp, *inp, *pinp;
|
||||
struct inoinfo **inpend;
|
||||
|
||||
/*
|
||||
|
@ -116,10 +117,10 @@ propagate()
|
|||
*/
|
||||
int
|
||||
dirscan(idesc)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct direct *dp;
|
||||
register struct bufarea *bp;
|
||||
struct direct *dp;
|
||||
struct bufarea *bp;
|
||||
int dsize, n;
|
||||
long blksiz;
|
||||
char dbuf[DIRBLKSIZ];
|
||||
|
@ -178,10 +179,10 @@ dirscan(idesc)
|
|||
*/
|
||||
static struct direct *
|
||||
fsck_readdir(idesc)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct direct *dp, *ndp;
|
||||
register struct bufarea *bp;
|
||||
struct direct *dp, *ndp;
|
||||
struct bufarea *bp;
|
||||
long size, blksiz, fix, dploc;
|
||||
|
||||
blksiz = idesc->id_numfrags * sblock.fs_fsize;
|
||||
|
@ -241,10 +242,10 @@ dpok:
|
|||
int
|
||||
dircheck(idesc, dp)
|
||||
struct inodesc *idesc;
|
||||
register struct direct *dp;
|
||||
struct direct *dp;
|
||||
{
|
||||
register int size;
|
||||
register char *cp;
|
||||
int size;
|
||||
char *cp;
|
||||
u_char namlen, type;
|
||||
int spaceleft;
|
||||
|
||||
|
@ -296,7 +297,7 @@ fileerror(cwd, ino, errmesg)
|
|||
ino_t cwd, ino;
|
||||
char *errmesg;
|
||||
{
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
char pathbuf[MAXPATHLEN + 1];
|
||||
|
||||
pwarn("%s ", errmesg);
|
||||
|
@ -317,10 +318,10 @@ fileerror(cwd, ino, errmesg)
|
|||
|
||||
void
|
||||
adjust(idesc, lcnt)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
short lcnt;
|
||||
{
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
|
||||
dp = ginode(idesc->id_number);
|
||||
if (dp->di_nlink == lcnt) {
|
||||
|
@ -350,7 +351,7 @@ static int
|
|||
mkentry(idesc)
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct direct *dirp = idesc->id_dirp;
|
||||
struct direct *dirp = idesc->id_dirp;
|
||||
struct direct newent;
|
||||
int newlen, oldlen;
|
||||
|
||||
|
@ -395,7 +396,7 @@ static int
|
|||
chgino(idesc)
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct direct *dirp = idesc->id_dirp;
|
||||
struct direct *dirp = idesc->id_dirp;
|
||||
|
||||
if (memcmp(dirp->d_name, idesc->id_name, (int)dirp->d_namlen + 1))
|
||||
return (KEEPON);
|
||||
|
@ -412,7 +413,7 @@ linkup(orphan, parentdir)
|
|||
ino_t orphan;
|
||||
ino_t parentdir;
|
||||
{
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
int lostdir;
|
||||
ino_t oldlfdir;
|
||||
struct inodesc idesc;
|
||||
|
@ -573,11 +574,11 @@ makeentry(parent, ino, name)
|
|||
*/
|
||||
static int
|
||||
expanddir(dp, name)
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
char *name;
|
||||
{
|
||||
daddr_t lastbn, newblk;
|
||||
register struct bufarea *bp;
|
||||
struct bufarea *bp;
|
||||
char *cp, firstblk[DIRBLKSIZ];
|
||||
|
||||
lastbn = lblkno(&sblock, dp->di_size);
|
||||
|
@ -636,7 +637,7 @@ allocdir(parent, request, mode)
|
|||
ino_t ino;
|
||||
char *cp;
|
||||
struct dinode *dp;
|
||||
register struct bufarea *bp;
|
||||
struct bufarea *bp;
|
||||
struct dirtemplate *dirp;
|
||||
|
||||
ino = allocino(request, IFDIR|mode);
|
||||
|
@ -706,8 +707,8 @@ lftempname(bufp, ino)
|
|||
char *bufp;
|
||||
ino_t ino;
|
||||
{
|
||||
register ino_t in;
|
||||
register char *cp;
|
||||
ino_t in;
|
||||
char *cp;
|
||||
int namlen;
|
||||
|
||||
cp = bufp + 2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: fsck_ffs.8,v 1.18 1997/04/21 11:34:39 mrg Exp $
|
||||
.\" $NetBSD: fsck_ffs.8,v 1.19 1997/09/14 14:36:30 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1989, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -40,7 +40,7 @@
|
|||
.Nm fsck_ffs
|
||||
.Nd Fast File System consistency check and interactive repair
|
||||
.Sh SYNOPSIS
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
.Op Fl b Ar block#
|
||||
.Op Fl c Ar level
|
||||
.Op Fl d
|
||||
|
@ -52,7 +52,7 @@
|
|||
.Ar filesystem
|
||||
.Ar ...
|
||||
.Sh DESCRIPTION
|
||||
.Nm Fsck_ffs
|
||||
.Nm
|
||||
performs interactive filesystem consistency checks and repair for each of
|
||||
the filesystems specified on the command line. It is normally invoked from
|
||||
.Xr fsck 8 .
|
||||
|
@ -75,7 +75,7 @@ Counts in the super-block wrong
|
|||
.El
|
||||
.Pp
|
||||
These are the only inconsistencies that
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
in ``preen''
|
||||
mode (with the
|
||||
.Fl p
|
||||
|
@ -84,7 +84,7 @@ with an abnormal return status.
|
|||
For each corrected inconsistency one or more lines will be printed
|
||||
identifying the filesystem on which the correction will take place,
|
||||
and the nature of the correction. After successfully correcting a filesystem,
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
will print the number of files on that filesystem,
|
||||
the number of used and free blocks,
|
||||
and the percentage of fragmentation.
|
||||
|
@ -92,13 +92,13 @@ and the percentage of fragmentation.
|
|||
If sent a
|
||||
.Dv QUIT
|
||||
signal,
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
will finish the filesystem checks, then exit with an abnormal return status.
|
||||
.Pp
|
||||
Without the
|
||||
.Fl p
|
||||
option,
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
audits and interactively repairs inconsistent conditions for filesystems.
|
||||
If the filesystem is inconsistent the operator is prompted for concurrence
|
||||
before each correction is attempted.
|
||||
|
@ -114,12 +114,12 @@ is to wait for the operator to respond
|
|||
or
|
||||
.Li no .
|
||||
If the operator does not have write permission on the filesystem
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
will default to a
|
||||
.Fl n
|
||||
action.
|
||||
.Pp
|
||||
.Nm Fsck
|
||||
.Nm
|
||||
has more consistency checks than
|
||||
its predecessors
|
||||
.Em check , dcheck , fcheck ,
|
||||
|
@ -154,7 +154,7 @@ If maxcontig is equal to one, delete any existing segment maps.
|
|||
.El
|
||||
.Pp
|
||||
In interactive mode,
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
will list the conversion to be made
|
||||
and ask whether the conversion should be done.
|
||||
If a negative answer is given,
|
||||
|
@ -188,7 +188,7 @@ by all users on the system should use a more restrictive
|
|||
set of permissions such as 700.
|
||||
.It Fl n
|
||||
Assume a no response to all questions asked by
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
except for
|
||||
.Ql CONTINUE? ,
|
||||
which is assumed to be affirmative;
|
||||
|
@ -260,7 +260,7 @@ Because of inconsistencies between the block device and the buffer cache,
|
|||
the raw device should always be used.
|
||||
.Sh DIAGNOSTICS
|
||||
The diagnostics produced by
|
||||
.Nm fsck_ffs
|
||||
.Nm
|
||||
are fully enumerated and explained in Appendix A of
|
||||
.Rs
|
||||
.%T "Fsck \- The UNIX File System Check Program"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inode.c,v 1.23 1996/10/11 20:15:47 thorpej Exp $ */
|
||||
/* $NetBSD: inode.c,v 1.24 1997/09/14 14:36:31 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)inode.c 8.5 (Berkeley) 2/8/95";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: inode.c,v 1.23 1996/10/11 20:15:47 thorpej Exp $";
|
||||
__RCSID("$NetBSD: inode.c,v 1.24 1997/09/14 14:36:31 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -64,9 +65,9 @@ static int iblock __P((struct inodesc *, long, u_int64_t));
|
|||
int
|
||||
ckinode(dp, idesc)
|
||||
struct dinode *dp;
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register ufs_daddr_t *ap;
|
||||
ufs_daddr_t *ap;
|
||||
long ret, n, ndb, offset;
|
||||
struct dinode dino;
|
||||
u_int64_t remsize, sizepb;
|
||||
|
@ -157,9 +158,9 @@ iblock(idesc, ilevel, isize)
|
|||
long ilevel;
|
||||
u_int64_t isize;
|
||||
{
|
||||
register daddr_t *ap;
|
||||
register daddr_t *aplim;
|
||||
register struct bufarea *bp;
|
||||
daddr_t *ap;
|
||||
daddr_t *aplim;
|
||||
struct bufarea *bp;
|
||||
int i, n, (*func) __P((struct inodesc *)), nif;
|
||||
u_int64_t sizepb;
|
||||
char buf[BUFSIZ];
|
||||
|
@ -243,7 +244,7 @@ chkrange(blk, cnt)
|
|||
daddr_t blk;
|
||||
int cnt;
|
||||
{
|
||||
register int c;
|
||||
int c;
|
||||
|
||||
if ((unsigned)(blk + cnt) > maxfsblock)
|
||||
return (1);
|
||||
|
@ -372,10 +373,10 @@ freeinodebuf()
|
|||
*/
|
||||
void
|
||||
cacheino(dp, inumber)
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
ino_t inumber;
|
||||
{
|
||||
register struct inoinfo *inp;
|
||||
struct inoinfo *inp;
|
||||
struct inoinfo **inpp;
|
||||
unsigned int blks;
|
||||
|
||||
|
@ -416,7 +417,7 @@ struct inoinfo *
|
|||
getinoinfo(inumber)
|
||||
ino_t inumber;
|
||||
{
|
||||
register struct inoinfo *inp;
|
||||
struct inoinfo *inp;
|
||||
|
||||
for (inp = inphead[inumber % numdirs]; inp; inp = inp->i_nexthash) {
|
||||
if (inp->i_number != inumber)
|
||||
|
@ -433,7 +434,7 @@ getinoinfo(inumber)
|
|||
void
|
||||
inocleanup()
|
||||
{
|
||||
register struct inoinfo **inpp;
|
||||
struct inoinfo **inpp;
|
||||
|
||||
if (inphead == NULL)
|
||||
return;
|
||||
|
@ -453,11 +454,11 @@ inodirty()
|
|||
|
||||
void
|
||||
clri(idesc, type, flag)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
char *type;
|
||||
int flag;
|
||||
{
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
|
||||
dp = ginode(idesc->id_number);
|
||||
if (flag == 1) {
|
||||
|
@ -480,7 +481,7 @@ int
|
|||
findname(idesc)
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct direct *dirp = idesc->id_dirp;
|
||||
struct direct *dirp = idesc->id_dirp;
|
||||
|
||||
if (dirp->d_ino != idesc->id_parent)
|
||||
return (KEEPON);
|
||||
|
@ -492,7 +493,7 @@ int
|
|||
findino(idesc)
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct direct *dirp = idesc->id_dirp;
|
||||
struct direct *dirp = idesc->id_dirp;
|
||||
|
||||
if (dirp->d_ino == 0)
|
||||
return (KEEPON);
|
||||
|
@ -508,8 +509,8 @@ void
|
|||
pinode(ino)
|
||||
ino_t ino;
|
||||
{
|
||||
register struct dinode *dp;
|
||||
register char *p;
|
||||
struct dinode *dp;
|
||||
char *p;
|
||||
struct passwd *pw;
|
||||
time_t t;
|
||||
|
||||
|
@ -570,8 +571,8 @@ allocino(request, type)
|
|||
ino_t request;
|
||||
int type;
|
||||
{
|
||||
register ino_t ino;
|
||||
register struct dinode *dp;
|
||||
ino_t ino;
|
||||
struct dinode *dp;
|
||||
time_t t;
|
||||
|
||||
if (request == 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.23 1996/10/22 16:35:04 christos Exp $ */
|
||||
/* $NetBSD: main.c,v 1.24 1997/09/14 14:36:32 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,17 +33,17 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"@(#) Copyright (c) 1980, 1986, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
__COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: main.c,v 1.23 1996/10/22 16:35:04 christos Exp $";
|
||||
__RCSID("$NetBSD: main.c,v 1.24 1997/09/14 14:36:32 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -69,7 +69,6 @@ int main __P((int, char *[]));
|
|||
|
||||
static int argtoi __P((int, char *, char *, int));
|
||||
static int checkfilesys __P((char *, char *, long, int));
|
||||
static int docheck __P((struct fstab *));
|
||||
static void usage __P((void));
|
||||
|
||||
|
||||
|
@ -85,7 +84,7 @@ main(argc, argv)
|
|||
|
||||
sync();
|
||||
skipclean = 1;
|
||||
while ((ch = getopt(argc, argv, "b:c:dfm:npy")) != EOF) {
|
||||
while ((ch = getopt(argc, argv, "b:c:dfm:npy")) != -1) {
|
||||
switch (ch) {
|
||||
case 'b':
|
||||
skipclean = 0;
|
||||
|
@ -167,23 +166,6 @@ argtoi(flag, req, str, base)
|
|||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine whether a filesystem should be checked.
|
||||
*/
|
||||
static int
|
||||
docheck(fsp)
|
||||
register struct fstab *fsp;
|
||||
{
|
||||
|
||||
if ((strcmp(fsp->fs_vfstype, "ufs") &&
|
||||
strcmp(fsp->fs_vfstype, "ffs")) ||
|
||||
(strcmp(fsp->fs_type, FSTAB_RW) &&
|
||||
strcmp(fsp->fs_type, FSTAB_RO)) ||
|
||||
fsp->fs_passno == 0)
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the specified filesystem.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $ */
|
||||
/* $NetBSD: pass1.c,v 1.17 1997/09/14 14:36:33 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pass1.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $";
|
||||
__RCSID("$NetBSD: pass1.c,v 1.17 1997/09/14 14:36:33 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -104,9 +105,9 @@ pass1()
|
|||
static void
|
||||
checkinode(inumber, idesc)
|
||||
ino_t inumber;
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
struct zlncnt *zlnp;
|
||||
int ndb, j;
|
||||
mode_t mode;
|
||||
|
@ -269,12 +270,12 @@ unknown:
|
|||
|
||||
int
|
||||
pass1check(idesc)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
int res = KEEPON;
|
||||
int anyout, nfrags;
|
||||
daddr_t blkno = idesc->id_blkno;
|
||||
register struct dups *dlp;
|
||||
struct dups *dlp;
|
||||
struct dups *new;
|
||||
|
||||
if ((anyout = chkrange(blkno, idesc->id_numfrags)) != 0) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass1b.c,v 1.10 1996/09/23 16:18:37 christos Exp $ */
|
||||
/* $NetBSD: pass1b.c,v 1.11 1997/09/14 14:36:33 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pass1b.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: pass1b.c,v 1.10 1996/09/23 16:18:37 christos Exp $";
|
||||
__RCSID("$NetBSD: pass1b.c,v 1.11 1997/09/14 14:36:33 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -56,8 +57,8 @@ static struct dups *duphead;
|
|||
void
|
||||
pass1b()
|
||||
{
|
||||
register int c, i;
|
||||
register struct dinode *dp;
|
||||
int c, i;
|
||||
struct dinode *dp;
|
||||
struct inodesc idesc;
|
||||
ino_t inumber;
|
||||
|
||||
|
@ -83,9 +84,9 @@ pass1b()
|
|||
|
||||
static int
|
||||
pass1bcheck(idesc)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct dups *dlp;
|
||||
struct dups *dlp;
|
||||
int nfrags, res = KEEPON;
|
||||
daddr_t blkno = idesc->id_blkno;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass2.c,v 1.17 1996/09/27 22:45:15 christos Exp $ */
|
||||
/* $NetBSD: pass2.c,v 1.18 1997/09/14 14:36:34 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pass2.c 8.6 (Berkeley) 10/27/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: pass2.c,v 1.17 1996/09/27 22:45:15 christos Exp $";
|
||||
__RCSID("$NetBSD: pass2.c,v 1.18 1997/09/14 14:36:34 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -63,8 +64,8 @@ static int blksort __P((const void *, const void *));
|
|||
void
|
||||
pass2()
|
||||
{
|
||||
register struct dinode *dp;
|
||||
register struct inoinfo **inpp, *inp;
|
||||
struct dinode *dp;
|
||||
struct inoinfo **inpp, *inp;
|
||||
struct inoinfo **inpend;
|
||||
struct inodesc curino;
|
||||
struct dinode dino;
|
||||
|
@ -202,8 +203,8 @@ static int
|
|||
pass2check(idesc)
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct direct *dirp = idesc->id_dirp;
|
||||
register struct inoinfo *inp;
|
||||
struct direct *dirp = idesc->id_dirp;
|
||||
struct inoinfo *inp;
|
||||
int n, entrysize, ret = 0;
|
||||
struct dinode *dp;
|
||||
char *errmsg;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass3.c,v 1.8 1995/03/18 14:55:54 cgd Exp $ */
|
||||
/* $NetBSD: pass3.c,v 1.9 1997/09/14 14:36:35 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pass3.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: pass3.c,v 1.8 1995/03/18 14:55:54 cgd Exp $";
|
||||
__RCSID("$NetBSD: pass3.c,v 1.9 1997/09/14 14:36:35 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -51,7 +52,7 @@ static char rcsid[] = "$NetBSD: pass3.c,v 1.8 1995/03/18 14:55:54 cgd Exp $";
|
|||
void
|
||||
pass3()
|
||||
{
|
||||
register struct inoinfo **inpp, *inp;
|
||||
struct inoinfo **inpp, *inp;
|
||||
ino_t orphan;
|
||||
int loopcnt;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass4.c,v 1.11 1996/09/27 22:45:17 christos Exp $ */
|
||||
/* $NetBSD: pass4.c,v 1.12 1997/09/14 14:36:36 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pass4.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: pass4.c,v 1.11 1996/09/27 22:45:17 christos Exp $";
|
||||
__RCSID("$NetBSD: pass4.c,v 1.12 1997/09/14 14:36:36 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -55,8 +56,8 @@ static char rcsid[] = "$NetBSD: pass4.c,v 1.11 1996/09/27 22:45:17 christos Exp
|
|||
void
|
||||
pass4()
|
||||
{
|
||||
register ino_t inumber;
|
||||
register struct zlncnt *zlnp;
|
||||
ino_t inumber;
|
||||
struct zlncnt *zlnp;
|
||||
struct dinode *dp;
|
||||
struct inodesc idesc;
|
||||
int n;
|
||||
|
@ -113,9 +114,9 @@ pass4()
|
|||
|
||||
int
|
||||
pass4check(idesc)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
register struct dups *dlp;
|
||||
struct dups *dlp;
|
||||
int nfrags, res = KEEPON;
|
||||
daddr_t blkno = idesc->id_blkno;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $ */
|
||||
/* $NetBSD: pass5.c,v 1.17 1997/09/14 14:36:36 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pass5.c 8.6 (Berkeley) 11/30/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $";
|
||||
__RCSID("$NetBSD: pass5.c,v 1.17 1997/09/14 14:36:36 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -55,17 +56,17 @@ static char rcsid[] = "$NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp
|
|||
void
|
||||
pass5()
|
||||
{
|
||||
int c, blk, frags, basesize, sumsize, mapsize, savednrpos;
|
||||
register struct fs *fs = &sblock;
|
||||
register struct cg *cg = &cgrp;
|
||||
int c, blk, frags, basesize, sumsize, mapsize, savednrpos = 0;
|
||||
struct fs *fs = &sblock;
|
||||
struct cg *cg = &cgrp;
|
||||
daddr_t dbase, dmax;
|
||||
register daddr_t d;
|
||||
register long i, j;
|
||||
daddr_t d;
|
||||
long i, j;
|
||||
struct csum *cs;
|
||||
struct csum cstotal;
|
||||
struct inodesc idesc[3];
|
||||
char buf[MAXBSIZE];
|
||||
register struct cg *newcg = (struct cg *)buf;
|
||||
struct cg *newcg = (struct cg *)buf;
|
||||
struct ocg *ocg = (struct ocg *)buf;
|
||||
|
||||
statemap[WINO] = USTATE;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: setup.c,v 1.27 1996/09/27 22:45:19 christos Exp $ */
|
||||
/* $NetBSD: setup.c,v 1.28 1997/09/14 14:36:37 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)setup.c 8.5 (Berkeley) 11/23/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: setup.c,v 1.27 1996/09/27 22:45:19 christos Exp $";
|
||||
__RCSID("$NetBSD: setup.c,v 1.28 1997/09/14 14:36:37 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -209,7 +210,7 @@ setup(dev)
|
|||
}
|
||||
}
|
||||
if (sblock.fs_bmask != ~(sblock.fs_bsize - 1)) {
|
||||
pwarn("INCORRECT BMASK=%x IN SUPERBLOCK",
|
||||
pwarn("INCORRECT BMASK=0x%x IN SUPERBLOCK",
|
||||
sblock.fs_bmask);
|
||||
sblock.fs_bmask = ~(sblock.fs_bsize - 1);
|
||||
if (preen)
|
||||
|
@ -220,7 +221,7 @@ setup(dev)
|
|||
}
|
||||
}
|
||||
if (sblock.fs_fmask != ~(sblock.fs_fsize - 1)) {
|
||||
pwarn("INCORRECT FMASK=%x IN SUPERBLOCK",
|
||||
pwarn("INCORRECT FMASK=0x%x IN SUPERBLOCK",
|
||||
sblock.fs_fmask);
|
||||
sblock.fs_fmask = ~(sblock.fs_fsize - 1);
|
||||
if (preen)
|
||||
|
@ -514,11 +515,11 @@ int
|
|||
calcsb(dev, devfd, fs)
|
||||
char *dev;
|
||||
int devfd;
|
||||
register struct fs *fs;
|
||||
struct fs *fs;
|
||||
{
|
||||
register struct disklabel *lp;
|
||||
register struct partition *pp;
|
||||
register char *cp;
|
||||
struct disklabel *lp;
|
||||
struct partition *pp;
|
||||
char *cp;
|
||||
int i;
|
||||
|
||||
cp = strchr(dev, '\0') - 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */
|
||||
/* $NetBSD: utilities.c,v 1.19 1997/09/14 14:36:38 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -33,11 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $";
|
||||
__RCSID("$NetBSD: utilities.c,v 1.19 1997/09/14 14:36:38 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -121,7 +122,7 @@ reply(question)
|
|||
void
|
||||
bufinit()
|
||||
{
|
||||
register struct bufarea *bp;
|
||||
struct bufarea *bp;
|
||||
long bufcnt, i;
|
||||
char *bufp;
|
||||
|
||||
|
@ -161,7 +162,7 @@ getdatablk(blkno, size)
|
|||
daddr_t blkno;
|
||||
long size;
|
||||
{
|
||||
register struct bufarea *bp;
|
||||
struct bufarea *bp;
|
||||
|
||||
for (bp = bufhead.b_next; bp != &bufhead; bp = bp->b_next)
|
||||
if (bp->b_bno == fsbtodb(&sblock, blkno))
|
||||
|
@ -187,7 +188,7 @@ foundit:
|
|||
|
||||
void
|
||||
getblk(bp, blk, size)
|
||||
register struct bufarea *bp;
|
||||
struct bufarea *bp;
|
||||
daddr_t blk;
|
||||
long size;
|
||||
{
|
||||
|
@ -206,9 +207,9 @@ getblk(bp, blk, size)
|
|||
void
|
||||
flush(fd, bp)
|
||||
int fd;
|
||||
register struct bufarea *bp;
|
||||
struct bufarea *bp;
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
if (!bp->b_dirty)
|
||||
return;
|
||||
|
@ -246,7 +247,7 @@ void
|
|||
ckfini(markclean)
|
||||
int markclean;
|
||||
{
|
||||
register struct bufarea *bp, *nbp;
|
||||
struct bufarea *bp, *nbp;
|
||||
int cnt = 0;
|
||||
|
||||
if (fswritefd < 0) {
|
||||
|
@ -373,7 +374,7 @@ int
|
|||
allocblk(frags)
|
||||
long frags;
|
||||
{
|
||||
register int i, j, k;
|
||||
int i, j, k;
|
||||
|
||||
if (frags <= 0 || frags > sblock.fs_frag)
|
||||
return (0);
|
||||
|
@ -421,7 +422,7 @@ getpathname(namebuf, curdir, ino)
|
|||
ino_t curdir, ino;
|
||||
{
|
||||
int len;
|
||||
register char *cp;
|
||||
char *cp;
|
||||
struct inodesc idesc;
|
||||
static int busy = 0;
|
||||
|
||||
|
@ -515,7 +516,7 @@ voidquit(n)
|
|||
*/
|
||||
int
|
||||
dofix(idesc, msg)
|
||||
register struct inodesc *idesc;
|
||||
struct inodesc *idesc;
|
||||
char *msg;
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue