Commit Graph

46 Commits

Author SHA1 Message Date
christos
c236bddb0f sprinkle const. 2005-06-27 01:25:35 +00:00
xtraeme
e3c8f73b9a whitespace (pointed out by wiz@) 2005-01-20 15:29:40 +00:00
xtraeme
52781d1897 Kill __P(), ANSIfy and WARNS=2 2005-01-19 17:33:58 +00:00
christos
d90f13b3bf Use -DPROGRESS to enable the progress bar, don't depend on SMALL. 2005-01-13 19:56:02 +00:00
christos
a73c2bd574 Add a progress meter to fsck_ffs based on the work by thorpej presented
to the mailing lists last January. This is optional.
2005-01-13 15:22:35 +00:00
ragge
801400d3c7 Cast to (long long int) to make last change compile on amd64. 2004-10-09 20:08:44 +00:00
dbj
a10669f5c2 if debug, print found/expected block & inode counts when incorrect 2004-10-08 16:42:55 +00:00
dbj
753116e06f do not upgrade superblock or set FS_FLAGS_UPDATED unless -c 4 option
is provided.
add compatibility for filesystems before FFSv2 integration
these patches are from pr port-macppc/23925 and should also
fix problems discussed in pr kern/21404 and pr kern/21283
2004-01-09 19:12:31 +00:00
itojun
731ae88ecd realloc pedant 2003-09-19 08:35:15 +00:00
agc
bf07c8719a Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:11 +00:00
fvdl
5f7172ed40 When fixing the cstotal structure, use the right size to copy it back.
Also, remove some accidentally committed debug code from the previous
commit.
2003-04-04 15:02:40 +00:00
fvdl
373feac024 Initialize cg_irotor correctly in newcg, to avoid false positives
for bad cylinder groups.
2003-04-04 13:45:21 +00:00
fvdl
42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
grant
c39c2e62d5 'NetBSD.org' and some mdoc fixes. 2003-02-14 16:21:47 +00:00
fvdl
a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
dbj
43395bd5a8 Add support for the Apple UFS variation on ffs
This is the bulk of PR #17345

The general approach is to use a run time deteriminable value
for DIRBLKSIZ.  Additional allowances are included for using
MAXSYMLINKLEN with FS_42INODEFMT and a shift in the cylinder group
cluster summary count array.  Support is added for managing
the Apple UFS volume label.
2002-09-28 20:11:05 +00:00
dbj
c88ccea33d commit fix from pr bin/15449
this fixes FS_42POSTBLFMT compatibility
2002-06-30 22:57:30 +00:00
lukem
bb82a84ded If SIGINFO is received, display summary information to stderr.
Based on changes in FreeBSD, via Chuck Cranor <chuck@research.att.com>
2002-05-06 03:17:43 +00:00
mycroft
fb1196703d Some manual strength reduction. 2002-04-10 17:29:30 +00:00
lukem
1b81d6353d remove third argument (`int ns') from ffs_sb_swap(), and let ffs_sb_swap()
determine the endianness of the `struct fs *o' superblock from o->fs_magic
and set needswap as necessary, rather than trusting the caller to get
it right.  invariably, almost every caller of ffs_sb_swap() was calling it
with ns set to the wrong value for ns anyway!
ansi KNF ffs_bswap.c declarations whilst here.

this fixes all sorts of problems when trying to use other-endian file systems,
notably the kernel trying to access memory *way* off, possibly corrupting or
panicing, and userland programs SEGVing and/or corrupting things (e.g,
"fsck_ffs -B"  to swap a file system endianness).

whilst the previous rev of ffs_bswap.c (1.10, 2000/12/23) made this problem
worse, i suspect that the problem was always there and previous versions
just happened not to trash things at the wrong time.

FFS_EI should now be a lot more stable.
2001-08-17 02:18:46 +00:00
thorpej
9c45d4b02d In pass 5, check alternate superblocks for consistency with
the current in-core master superblock, and fix them up if
they're incorrect.  Move the code that writes the alternate
superblocks if (cvtlevel || doswap) into pass 5 for efficiency.

Reviewd by Charles Hannum, and used by me to fix up a curdled
file system.
2001-01-26 17:37:16 +00:00
mycroft
d722519e03 Make sure the rotor values are non-negative. 2001-01-09 11:20:00 +00:00
mycroft
9496d82675 Add a missing newline in one message.
(The fact that I got this message using softdep should probably disturb
someone...)
2000-07-14 02:43:44 +00:00
bouyer
15ca2512dc Add a missing '\n'. 1999-11-28 20:03:17 +00:00
fvdl
f2651c65ac Fix %d <-> long mismatch. 1999-11-15 20:31:51 +00:00
fvdl
a905c40444 Changes for softdep code. 1999-11-15 19:18:24 +00:00
ross
029a64cc29 from Erik Bertelsen <erik@mediator.uni-c.dk>
{ put } { in } { lots } { of } { these } { to } { shut } { up } { egcs }
1998-08-25 19:18:12 +00:00
bouyer
9aaa32d9a7 Add support for non-native byteorder FFS, and converting byteorder.
Also, be a bit more conservative with the clean flag: don't mark the FS
clean when we know there may still be errors (user anserwed 'n' to
a question, or fsck says "you must rerun fsck").
1998-03-18 17:01:23 +00:00
lukem
e111111128 resolve conflicts from lite-2 merge. 1997-09-16 16:44:43 +00:00
lukem
b1db038303 * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck() func
* prefix hex numbers with '0x'
* getopt returns -1 not EOF
1997-09-14 14:36:29 +00:00
christos
c5d8ca200f - util.h -> fsutil.h 1996-09-27 22:45:10 +00:00
christos
5528d37484 - fixed all printf formats [there were a lot of %l? <-> %? mistakes]
- added missing prototypes, and made local functions static
- removed parallel preening code; this is part of fsck(8)
- use printing utilities from fsck(8)
- Makefile does not make links to fsck and fsck.8
- removed -l maxparallel option. It has no meaning anymore.
1996-09-23 16:18:31 +00:00
cgd
38bab6b6da type sizes 1995-03-21 01:30:09 +00:00
cgd
0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
mycroft
0826920c54 Mostly sync with CSRG. 1994-12-28 00:03:49 +00:00
cgd
d71db3e4a6 light clean, and make it compile against new header files. 1994-12-18 15:55:41 +00:00
cgd
5eeab43e28 more cleanups from Jim Jegers, passed over by me. 1994-12-05 20:15:31 +00:00
mycroft
54477c5285 Use the S_IS*() macros, and make this compile again after Chris's changes to ufs. 1994-10-28 16:55:05 +00:00
mycroft
4922d725cf Remove some more uses of obsolete functions. 1994-09-23 23:48:10 +00:00
mycroft
ea7b5d4ec6 Eliminate uses of some obsolete functions. 1994-09-23 14:26:58 +00:00
mycroft
ccfa3742b5 Update from 4.4-Lite, with local changes. 1994-06-08 18:57:30 +00:00
cgd
9a2c884999 need <sys/time.h> 1994-04-25 18:28:42 +00:00
mycroft
e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd
06be60083d changed "Id" to "Header" for rcsids 1993-03-23 00:22:59 +00:00
cgd
346aa5dd48 added rcs ids to all files 1993-03-22 08:04:00 +00:00
cgd
61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00