Commit Graph

32 Commits

Author SHA1 Message Date
christos 3747949d9f Instead of zerodivide, give a useful error message. 2014-12-04 01:41:37 +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 f1333577b5 Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
2013-06-19 17:51:25 +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
plunky 2b8aaed8cd NULL does not need a cast, here 2011-09-16 16:13:16 +00:00
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
tsutsui f592533590 - add a sanity check for e2fs_inode_size in readsb()
- use EXT2_DINODE_SIZE() rather than sizeof(struct ext2fs_dinode) or
  struct ext2fs_dinode array/pointer to see e2fs_ipb and inode offsets
2009-03-02 11:31:59 +00:00
lukem 481ad7b03a errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
2008-03-16 23:17:55 +00:00
tsutsui 68fb2791e1 Use h2fs32() rather than fs2h32() on host to disk conversion. 2007-12-22 01:19:52 +00:00
tsutsui 37d769ed47 - use MINFREE defiend in <ufs/ext2fs/ext2fs.h>
- remove unnecessary casts
- unsigned -> unsigned int
- misc KNF
2007-12-22 01:15:49 +00:00
tsutsui 7bc26029c9 Remove unused macro. 2007-12-22 00:28:21 +00:00
tsutsui 672990c37a Fix e2fs_itpg calculation (a rounddown bug). 2007-11-13 17:25:43 +00:00
christos 68475dcb61 comment out impossible code. 2006-10-16 03:01:36 +00:00
christos 97880e96ed constify. 2005-06-26 23:01:39 +00:00
ws d53c382dbf Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
2005-02-09 22:55:45 +00:00
xtraeme ccde05f070 Kill __P(), ANSIfy, remove main() prototype; WARNS=2 2005-01-19 19:31:28 +00:00
dsl e6bc82d904 Add (unsigned char) cast to ctype function
Fix check for device name ending in [0-9a-h] (strchr(dev, 0) doesn't ever
return NULL - which is fortunate because the () were wrong as well!)
2004-10-29 17:37:30 +00:00
bouyer 2f853da9b0 Fix disclaimer in my copyright. Pointed out by Thomas Klausner. 2004-03-22 19:46:53 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +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
bouyer 09d4663f6e Correct bogons in filetype option support, and add support for the
sparse_super option.
2000-01-28 16:01:46 +00:00
bouyer 5fb6bc4e18 First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
2000-01-26 16:21:31 +00:00
bouyer 1bb2b4dd78 Properly handle FIFO (linux seems to puts something in the block addr fields
here) and a new field that can be different in the master superblock and
its first copy. From Tim Shepard.
1999-02-17 13:11:19 +00:00
bouyer c3d84360ae Check malloc's return value before using the pointer. 1999-02-01 15:20:14 +00:00
christos 7b57bf6d78 Adjust for DKTYPENAME changes. 1998-11-12 16:19:47 +00:00
mycroft 0e3ffd8405 const poisoning. 1998-07-26 20:23:15 +00:00
bouyer 7052d78b8d Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
1997-10-09 13:19:32 +00:00
mrg 52ff5d8fee make these compile on the alpha after WARNS=1. 1997-09-16 08:37:01 +00:00
lukem 4b836889ab * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
  & 0xff, not the result of printf() itself...
1997-09-14 14:27:23 +00:00
mikel fc364ac664 prototype calcsb() 1997-07-10 04:53:35 +00:00
bouyer de96ec69e2 The computed superblock size is bigger than SBSIZE, malloc() enouth
memory for it. Apparently, this bug was hidden by our malloc implementation.
Reported by Jason Downs.
1997-06-16 08:14:38 +00:00
bouyer 8f7c2b3739 Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs. 1997-06-11 11:21:39 +00:00