Commit Graph

49 Commits

Author SHA1 Message Date
christos 8ee626c9fa improve error messages (remove \n, use __func__, etc) 2015-06-16 23:04:13 +00:00
dholland e1610ba4cb Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

   lblkno
   lblktosize
   lfragtosize
   numfrags
   blkroundup
   fragroundup
2013-06-23 07:28:36 +00:00
dholland 2737439da3 fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
2013-06-23 02:06:04 +00:00
dholland dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
christos 5727fadda2 use getfsspecname() 2012-04-07 04:52:20 +00:00
christos 6a453cd117 more code deduplication 2011-03-06 23:25:42 +00:00
christos 412de05f04 more KNF 2011-03-06 23:13:22 +00:00
christos a518d1d73c use merged out code. 2011-03-06 23:07:23 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
christos 9e0fa13510 PR/39719: Edgar Fu: block/inode typo in quotacheck(8) 2008-10-09 14:56:35 +00:00
lukem 9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
christos 4ea9e53dee From Edgar: fix ino computation; allocate space for the superblock after
we know how big it is.
2007-02-15 19:00:11 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
christos 31c88148c1 PR/23971: Greg A. Woods: Fix quotacheck infinite loop with uid == UINT32_MAX.
While I am there, pass WARNS=3
2004-12-12 05:57:03 +00:00
dsl c89c679638 fffv2 might not have FS_FLAGS_UPDATED set 2004-03-27 13:11:47 +00:00
dsl a78ca7231d When searching for the superblock, don't pick an ffsv1 superblock from the
location where we expect to find an ffsv2 superblock.
It could be the first alternate for a ffsv1 filesystem with 64k blocks.
Fixes part of PR kern/24809
2004-03-21 22:07:22 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
wiz e055b80b2e Add -l to usage. 2004-01-05 18:46:33 +00:00
christos f2563a1a34 don't allow -l without -a 2004-01-05 17:43:25 +00:00
wiz d8ca651179 Add -q to usage. 2004-01-05 17:26:57 +00:00
christos 43c0378045 PR/23971: Robert Elz: Quotacheck fails when max uid is present and takes
forever if there are large gaps in the uid space. It also does not work
properly with the fsck preen code it uses.
2004-01-05 00:17:07 +00:00
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun 7bb0ef551c use bounded string op 2003-07-13 12:18:55 +00:00
fvdl 4589db98fb Skip over inodes <= ROOTINO for getnextinode(). PR 21208 by Geoff Wing. 2003-04-17 09:21:01 +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
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
bouyer c841e4e679 Add SIGINFO support. 2002-12-10 22:42:00 +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
cgd 25bdbb661e convert to use getprogname() 2001-02-19 23:22:40 +00:00
abs 4bd70a584f If -a, we do not want to pay the cost of processing every group and password
entry if there are no filesystems with quotas. Speeds up boot on a large YP
site without quotas considerably. If a filesystem has quotas we process
/etc/fstab twice, which is very cheap in relative terms.
1999-03-30 23:56:26 +00:00
ross b1934d6034 {} fixes from Erik Bertelsen <erik@erik-be.uni-c.dk> (PR 6047) to shut up egcs. 1998-08-27 20:31:00 +00:00
mycroft 1f86e5830d const poisoning. 1998-07-27 00:52:00 +00:00
bouyer 67010392f2 Add support for non-native byteorder FFS.
The quota file is still in host byteorder. quotacheck needs to be re-run
when a FS has been moved to an architecture to another. Running quota
on a non-native byteorder ffs is considered a marginal case.
1998-03-18 17:22:38 +00:00
christos 6807fc37b2 Fix uninitialized variable 1997-09-19 21:22:38 +00:00
lukem 375567dca2 * resolve conflicts from lite-2 merge
* cleanup for WARNS=1
1997-09-16 13:07:59 +00:00
christos 4df3bfced1 Update for newer preen interface. 1996-09-28 19:20:44 +00:00
christos c1a92bcb82 This broke when preen.c moved from fsck_ffs to fsck. Update and cleanup. 1996-09-27 23:25:34 +00:00
mark 036d834ee8 Use an integer instead of a char for the getopt() return value in order
to work with compilers that use unsigned chars.
Compare the getopt() return value with -1 instead of EOF.
1996-03-30 22:34:25 +00:00
jtc 0a1e7de7b6 merge in changes from 1.1 release branch 1995-11-28 05:25:28 +00:00
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
cgd f24d9135d1 <sys/queue.h> is no longer needed. 1995-01-03 02:06:24 +00:00
cgd a2fc49f975 compile against new headers 1994-12-18 16:01:13 +00:00
mycroft ea7b5d4ec6 Eliminate uses of some obsolete functions. 1994-09-23 14:26:58 +00:00
mycroft c55423b664 Fix an obvious bogon when checking multiple file systems, and use the libc
version of err(3).
1994-08-16 19:22:02 +00:00
mycroft 625a6892f7 Update from 4.4-Lite, with local changes. 1994-06-08 19:27:32 +00:00
cgd 984d40a72f pass a daddr_t rather than an off_t; forgot to commit last week. 1994-05-26 06:53:36 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 318000897b fixe for uninitialized variables, from 386bsd patchkit patch #111 1993-05-07 05:16:15 +00:00
cgd 6f9402e83b ported from Net/2. (patch 111) 1993-04-09 19:25:07 +00:00