joerg
6ce4f404a1
Fix depenency on common symbols in sbin.
2020-04-05 15:25:39 +00:00
kamil
1f7b844ec7
fsck: Stop defining the same variable concurrently in bss and data
...
returntosingle was defined in multiple places:
- fsck_lfs/main.c
- fsck_ffs/main.c
- fsck_ext2fs/main.c
- fsck/fsutil.c
Keep the fsutil.c definition as the only one.
Detected during the build of telned with Address Sanitizer (MKSANITIZER).
2019-08-15 03:10:42 +00:00
mlelstv
da22d85db7
Ignore EXT4 'kbytes written' field when validating alternate superblock.
2019-03-31 13:16:52 +00:00
mlelstv
25aaa28e7c
No longer rely on data in disklabel to deduce alternate superblock
...
positions from block size. Instead use the same defaults as newfs_ext2fs.
Side effect is that fsck_ext2fs now works with wedges.
2019-03-31 10:55:58 +00:00
mlelstv
fcaa2faa3e
remove debug printfs from last commit.
2019-03-31 10:52:00 +00:00
mlelstv
bbddb1419d
Ignore recorded last mount point when validating alternate superblocks.
...
Compute log_bsize correctly. This fixes computation of alternate
superblock addresses.
2019-03-30 17:32:40 +00:00
mrg
fbffadb9f8
- add or adjust /* FALLTHROUGH */ where appropriate
...
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
sevan
697ce8551e
Remove references to -c flag which was never included.
2018-08-27 15:16:49 +00:00
christos
0185392700
Fix previous properly (wrong variable was tested) thanks riastradh@
2017-04-21 19:33:56 +00:00
christos
a110095d6d
e2di_block is an array; can't be NULL, (clang)
2017-04-21 17:33:04 +00:00
sevan
a7a41f50d0
Document the author and the version fsck_ext2fs first appeared.
...
Bump date.
2016-09-11 03:56:00 +00:00
jdolecek
a5764f7139
more informative debug output for unsupported features
2016-08-15 19:13:24 +00:00
jdolecek
b720c3e2bb
adjust inode size check to compare against EXT2_REV0_DINODE_SIZE, rather then sizeof(struct ext2fs_dinode), as the structure definition was expanded with the optional fields
2016-08-15 18:57:06 +00:00
jdolecek
d2d8cddee2
divorce list of features supported by fsck_ext2fs from the kernel;
...
while kernel might support e.g. extents, extra_isize or dir_nlink,
fsck could actually have no idea about the features
2016-08-15 18:42:15 +00:00
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
christos
3747949d9f
Instead of zerodivide, give a useful error message.
2014-12-04 01:41:37 +00:00
joerg
f6d86cb881
Make pointer NULL check non-fatal for a bogus condition.
2014-03-04 21:07:22 +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
5a420c1b9a
Stick UFS_ in front of these symbols:
...
DIRBLKSIZ
DIRECTSIZ
DIRSIZ
OLDDIRFMT
NEWDIRFMT
Part of PR 47909.
2013-06-09 17:57:08 +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
jakllsch
afc2ce4252
e2di_nblock is (assuming the huge_file feature is not active) stored in
...
DEV_BSIZE units, not fs block size units.
2012-11-25 19:36:23 +00:00
dholland
2d1cf01ec8
stdlib.h, not malloc.h
2012-08-26 09:33:18 +00:00
plunky
2b8aaed8cd
NULL does not need a cast, here
2011-09-16 16:13:16 +00:00
dholland
36f9677de9
Avoid -Wno-pointer-sign.
2011-08-06 16:42:41 +00:00
dholland
2fb6ddee8c
Add static to a private function.
2011-08-06 16:39:40 +00:00
mrg
75e42fa7da
remove most of the remaining HAVE_GCC tests that are always true in
...
the modern world.
2011-06-20 07:43:56 +00:00
christos
23ffdf5bd3
share more code.
2011-06-09 19:57:50 +00:00
wiz
1a64f4201c
Call the file system "ext2" consistently. Suggested by tsutsui.
2010-02-21 13:26:45 +00:00
christos
c68c36a514
Centralize time printing and deal with ctime possibly returning NULL.
2010-02-04 23:55:42 +00:00
christos
36cd9355e9
make this compile again.
2010-01-07 01:39:56 +00:00
christos
87e82597b6
PR/42568: Pedro F. Giffuni: Better signal handling from OpenBSD, but simplified.
2010-01-06 18:12:37 +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
tron
e67b5654ff
Ignore the "-P" option as intended to make this work with e.g.
...
"fsck_flags=-pP" in "/etc/rc.conf".
Patch supplied by Pierre Pronchery in PR bin/41490.
2009-08-16 13:50:54 +00:00
lukem
5bd52bbac4
fix sign-compare issues
2009-04-06 12:50:36 +00:00
joerg
d7eb1430e2
Fix markup.
2009-03-15 10:01:47 +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
2af45ff960
Remove unnecessary casts.
2008-11-24 18:05:25 +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
wiz
af2c2b73f3
Don't use unicode in usage.
...
Noted by Anon Ymous.
2008-10-12 20:49:43 +00:00
wiz
89cc13767c
Sync usage with man page.
2008-10-09 18:38:24 +00:00
wiz
104f1a2c29
Standardize.
2008-10-09 18:32:08 +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
gmcgarry
3c9a95916d
Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.
2008-08-29 00:02:21 +00:00
lukem
6543a91fea
Remove the \n and tabs from the __COPYRIGHT() strings.
...
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00