Commit Graph

37 Commits

Author SHA1 Message Date
jdolecek 249e8f5f7e rename struct ext2fs_dinode attribute e2di_dacl to correct
e2di_size_high; even Linux ext2 filesystem code actually uses it
unconditionally this way and ext4 code finally also calls it that way
in their struct definition too; if there was any trace of this for other
purpose it's long gone
2016-08-04 17:43:47 +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 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
jakllsch a3904b0b1f Catch up to the kernel with respect to Ext2 huge_file feature. 2012-11-25 19:42:14 +00:00
christos c68c36a514 Centralize time printing and deal with ctime possibly returning NULL. 2010-02-04 23:55:42 +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
lukem 5bd52bbac4 fix sign-compare issues 2009-04-06 12:50:36 +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
tsutsui 0c5d01004e Handle 32 bit uid field on E2FS_REV1. 2008-11-24 17:41:29 +00:00
tsutsui 6189d5e324 Add missed byteswap ops against ext2fs_dinode members. 2008-11-24 17:37:17 +00:00
tsutsui ee70a0c964 Use "size > INT32_MAX" rather than "size >= 0x80000000U" to check 2GB limit. 2008-11-24 17:30:12 +00:00
tsutsui a43d077c5c - unsigned -> unsigned int
- remove unnecessary casts from malloc(3) and free(3)
- fix a bogus indent
2008-11-24 17:19:53 +00:00
christos 59334248e2 Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
2008-10-09 16:56:23 +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 1e795b0373 Add a workaround for incorrect "SUMMARY INFORMATIONS WRONG FOR CG #N"
and "BLK(S) MISSING IN BIT MAP #N" reports on newer ext2fs with
EXT2F_COMPAT_RESIZE feature by accounting blocks in EXT2_RESIZEINO.

XXX1: Should we account blocks allocated by all other reserved inodes?
XXX2: We should really check and fix EXT2_RESIZEINO accordingly.
2007-11-16 16:55:04 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
christos 042582c125 more const. 2005-06-26 23:04:19 +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 e4e811215a Kill __P(); 2005-02-05 14:26:05 +00:00
xtraeme ccde05f070 Kill __P(), ANSIfy, remove main() prototype; WARNS=2 2005-01-19 19:31:28 +00:00
bouyer 2f853da9b0 Fix disclaimer in my copyright. Pointed out by Thomas Klausner. 2004-03-22 19:46:53 +00:00
bouyer 85050e8b77 More licence fixes, pointed out by Thomas Klausner. 2003-10-05 20:54:45 +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
itojun 49fbaf537e use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
2003-07-13 08:22:55 +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 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
mycroft 519d858510 __AUDIT__ cleanup. 1998-07-28 19:22:54 +00:00
kleink 4212e56453 Need <time.h> for ctime() and time() prototypes. 1998-04-01 15:22:57 +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
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
bouyer 8f7c2b3739 Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs. 1997-06-11 11:21:39 +00:00