Also use complete sentences, instead of separate words filled
into a phrase. And gettextize the main output message.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Take the opportunity to wrap the string to be more readable,
and sort the options somewhat alphabetically.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Fix typo; instead of checking for s_feature_incompat twice, add check
for s_feature_ro_compat.
Thanks to Benno Schulenberg for noticing this problem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The Makefile should use BUILD_CFLAGS instead of ALL_CFLAGS since it
will be built for the host, not the target.
Addresses-Sourceforge-Bug: #2019287
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Disordered inode tables may appear when inode_blocks_per_group is lesser
or equal to the number of groups in a flex group.
This bug can be reproduced with:
mkfs.ext4 -t ext4dev -G512 70G
In that case, you can see with dump2fs that inode tables for groups 510
and 511 are placed just after group 51's inode table instead of being
placed after group 509's inode table.
Signed-off-by: Frederic Bohe <frederic.bohe@bull.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
These were caused by multi-line strings missing a space at the line
break. Thanks to translator Phillipp Thomas for noticing these typo's.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
For people who are compiling mke2fs for their own use outside of a
package manager, we need to make sure the system /etc/mke2fs.conf is
sufficiently up-to-date that it won't cause problems, but at the same
time we don't want to blow away any user-specific customizations.
So if /etc/mk2fs.conf exists, but does not mention ext4dev, we will
move it aside to /etc/mke2fs.conf.e2fsprogs-old and then install the
new mke2fs.conf. If the /etc/mke2fs.conf file exists but does mention
ext4dev, we install the new mke2fs.conf file as
/etc/mke2fs.conf.e2fsprogs-new. In both cases we print a warning
mesage to the user so they can manually update /etc/mke2fs.conf with
any changes if they so desire.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
It looks like the right place to check for ino=0 in
ext2fs_read_inode_full() is before creating the inode cache, otherwise
since we set icache[i].ino = 0 in create_icache(), it will match the
loop below and thus we return a wrong value.
Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
It's not needed for e2fsprogs, but one niche distribution likes to use
configure.sh files which can cause GNU make to inappropriately fire an
implicit rule to overwrite the configure file resulting in a fork bomb
leading to the OOM crash.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
There were a few places where we don't check to make sure
dev->bid_type is non-NULL before dereferencing the pointer, mostly in
debug code.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
ext2fs_group_desc_csum_verify() is always checking the bg_checksum (to
make sure it is zero) even when the GDT_CSUM feature is not present.
This is normally OK, but apparently there are filesystems in the wild
where this field has not be initialized to zero.
Addresses-Debian-Bug: #490637
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Solaris C99 apparently doesn't support it. We should report the
program name, not the internal function name, when printing an error
in any case.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This is needed so that "make check" works in the e2fsck library even
if the shared libraries are not yet installed, and so that we run
those programs against the version of the libraries built in the build
tree.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
On Solaris setbuf() will discard any pending output to the stream, so
make we call fflush() before calling setbuf().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Solaris's header files are very picky about which C compiler can be
used for SUSv3 conformance. Use of C99 is not compatible with SUSv2
(_XOPEN_SOURCE=500), and C89 is not compatible with SUSv3
(_XOPEN_SOURCE=600). Since we need some SUSv3 functions, consistently
use SUSv3 so that e2fsprogs will build on Solaris using c99.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Gcc only supports __builtin_expect for gcc versions 2.96 and up.
Since it's tricky to check for gcc 2.95 vs 2.96 (and either are only
used on really ancient systems anyway), we only use this optimization
on 3.x and newer versions of gcc.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Solaris polutes the C namespace with kmem_cache_t when
you include in/netinet.h is included, so rename kmem_cache_t
to lkmem_cache_t.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Also accessed via -o list, this new output format is much more
user-friendly and lists whether or not a particular device is mounted.
Addresses-Debian-Bug #490527
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
If we fail doing ext2fs_allocate_block_bitmap() or
ext2fs_allocate_inode_bitmap() we directly goto cleanup and don't free
the memory allocated to buf.
Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>