Commit Graph

19 Commits

Author SHA1 Message Date
Ian Dowse
bf58d635ba Fix a large number of -Wall, -Wformat and -W compiler warnings.
These were mainly missing casts or wrong format strings in printf
statements, but there were also missing includes, unused variables,
functions and arguments.

The choice of `long' vs `int' still seems almost random in a lot
of places though.
2001-11-17 23:48:21 +00:00
Kirk McKusick
7578c6ab98 Additions to run checks on live filesystems. This change will not
affect current systems until fsck is modified to use these new
facilities. To try out this change, set the fsck passno to zero
in /etc/fstab to cause the filesystem to be mounted without running
fsck, then run `fsck_ffs -p -B <filesystem>' after the system has
been brought up multiuser to run a background cleanup on <filesystem>.
Note that the <filesystem> in question must have soft updates enabled.
2001-03-21 09:48:03 +00:00
Kirk McKusick
91ea161570 If the lost+found directory is created by fsck, it will do a cacheino()
which sets the inoinfo's i_parent and i_dotdot to 0, but they never get
set to ROOTINO. This means that propagate will never find lost+found and
its descendents, subdirectories will remain DSTATE (instead of DFOUND)
even though they *are* correctly linked in, and pass4.c will try to
clear them unsuccessfully, thinking that there is no link count from the
DSTATE directory's parent. The result is that you need to run fsck twice
and get link count increasing errors (which are unexpected and fatal
when running in preen mode). The fix is to set i_parent and i_dotdot to
"parent" after the second cacheino() call in dir.c:allocdir().

Obtained from:	"Ethan Solomita" <ethan@geocast.com> (of the NetBSD Project)
2000-07-24 19:50:20 +00:00
Kirk McKusick
142d8d2f40 Teach fsck about snapshot files. These changes should have no
effect on operation of fsck on filesystems without snapshots.
If you get compilation errors, be sure that you have copies of
/usr/include/sys/mount.h (1.94), /usr/include/sys/stat.h (1.21),
and /usr/include/ufs/ffs/fs.h (1.16) as of July 4, 2000 or later.
2000-07-06 02:03:11 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Julian Elischer
6b100474f7 Cosmetic and documentation changes brought from earlier FreeBSD versions.
(e.g. RCS Id:)
1998-12-03 02:41:11 +00:00
Julian Elischer
d33e92f93e Reviewed by: Don Lewis <Don.Lewis@tsc.tdk.com>
Submitted by:	Kirk McKusick <mckusick@McKusick.COM>
Obtained from:	Mckusick, BSDI and a host of others

This exactly matches Kirks sources imported under the
Tag MCKUSICK2. These are as supplied by kirk with one small
change needed to compile under freeBSD.

Some FreeBSD patches will be added back, though many have been
added to Kirk's sources already.
1998-12-03 02:27:35 +00:00
Nate Williams
e4b74ed73c - Back out softupdate change that already existed in FreeBSD from V1.6,
which caused the reference count of a directory to get doubly
  decremented.

PR:		bin/8030
Reviewed by:	nate
Submitted by:	Don Lewis <Don.Lewis@tsc.tdk.com>
1998-09-23 05:37:35 +00:00
Bruce Evans
b10466261e Fixed printf format errors. 1998-06-28 19:23:03 +00:00
Philippe Charnier
2d34272b7b Correct use of .Nm. Add rcsid. Remove unused #includes. Use err(3). 1998-06-15 07:07:21 +00:00
Julian Elischer
b1897c197c Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by:	Kirk McKusick (mcKusick@mckusick.com)
Obtained from:  WHistle development tree
1998-03-08 09:59:44 +00:00
Bruce Evans
04aba25407 Finished (?) merging with Lite2: cleaned up #include mess.
Fixed misformatting in a comment.
1997-03-12 16:49:28 +00:00
Peter Wemm
780a5c1ec1 Merge from Lite2. Note that Lite2 has it's own filesystem clean check
skipping code that overrides ours sooner.  One should be eliminated,
but for now it works.
1997-03-11 12:20:21 +00:00
Nate Williams
119e9fc298 From: Terry Lambert <terry@lambert.org>
Subject: Fix for annoying fsck bug
Date: Wed, 24 Jan 1996 13:33:29 -0700 (MST)

The following small diff fixes the annoying fsck bug that causes it to
need to be run twice to end up with correct reference counts for inodes
for directories that had subdirectories relocated into the lost+found
directory.

I found the need to rerun *extremely* annoying.  This fix causes the
count to be correctly adjusted later in pass 4 by correctly stating
the parent reference count.

Note that the parent reference count is incremented when the directory
entry is made (for ".."), but is not really there in the case of a
directory that does not make an entry in its parent dir.

This can be tested by waiting for the inode sync after cd'ing from a
shell into a test fs.  Then you "mkdir xxx yyy zzz", wait a second,
and hit the machine reset button.

Reviewed by:	nate (Tested lots of crashes :)
Submitted by:	Terry Lambert <terry@lambert.org>
1996-05-09 16:38:27 +00:00
Rodney W. Grimes
5ebc7e6281 Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
Bruce Evans
3eeb5bdcb3 Submitted by: Philippe Charnier <charnier@lirmm.fr>, distilled by bde
Fix a couple more bogus types that aren't reported by `gcc -Wall'.
1995-04-02 15:25:19 +00:00
Bruce Evans
31f4ab50bc Submitted by: phk, added to by bde
Fix all the warnings from `gcc -Wall'.
1995-04-02 14:52:29 +00:00
David Greenman
9fef312289 Two fixes from the NetBSD group (Charles Hannum):
1) dir.c: get byte order right in mkentry()
2) pass1.c: When doing -c2 conversion, do secsize reads for a symlink -
   not doing so was causing the conversion to fail because the device
   driver can't deal with short reads.
1994-09-09 11:06:27 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00