The mk_cmds and compile_et scripts include the build directory, which
breaks the build reproducibility goal of Debian.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The message requesting that the user run e2fsck doesn't include the -f
option, and this is needed to force a file system check.
Addresses-Debian-Bug: #828022
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
llvm warns about the confusingly written comparison:
!strncmp(argv[i+1], "-", 1) == 0) {
misc/fsck.c:1178 col 9: warning: logical not is only applied to
the left hand side of comparison [-Wlogical-not-parentheses]
misc/fsck.c:1178 col 9: note: add parentheses after the '!' to
evaluate the comparison first
misc/fsck.c:1178 col 9: note: add parentheses around left hand
side expression to silence this warning
It makes sense to simplify this to a character comparison rather
than using strncmp() to check only one character.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
In m_minrootdir, on FreeBSD 9.3, try_lseek_copy() fails on an empty file
because errcode is uninitialized and the while() loop never executes,
and the errcode garbage is returned.
Initialize errcode = 0 in try_lseek_copy() to avoid a "fail" result when
there was nothing to copy.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
It otherwise leads to build failure when using an unbundled libintl.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Two new e2undo issues exist in the latest release on big endian
machines.
From sparse check:
undo_io.c:157:26: warning: invalid assignment: |=
undo_io.c:157:26: left side has type restricted __le32
undo_io.c:157:26: right side has type int
undo_io.c:161:26: warning: invalid assignment: &=
undo_io.c:161:26: left side has type restricted __le32
undo_io.c:161:26: right side has type int
e2undo.c:211:16: warning: cast to restricted __le64
e2undo.c:211:16: warning: cast from restricted blk64_t
e2undo.c:212:16: warning: cast to restricted __le64
e2undo.c:212:16: warning: cast from restricted blk64_t
Addresses-RedHat-Bugzilla: 1344636
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Only install the manual page if fuse2fs itself will be installed.
Signed-off-by: Ingo Brückl <ib@wupperonline.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
It uses clock_gettime() which in older glibc versions is in librt.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
If there is a feature check, we can just depend on the feature check.
If it is something that can't be checked via a feature flag, then
instead of checking for EXT2_OS_LINUX, we should instead check for
*NOT* EXT2_OS_HURD. since HURD is the special case.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The s_creator_os field was a mistake, given how Hurd has been
ab(using) certain file system fields. We should skip support for
certain advanced features (64-bit support, metadata checksums) for
file systems created on the Hurd OS only, instead of only supporting
them for file systems created on Linux. This fixes various regression
test failures for FreeBSD.
(The regression tests are probably mostly hopeless for Hurd anyway,
but given the HURD abuse's of various file system fields, the HURD is
going to have to be given second-class treatment in any case, given
what they decided to do with ext2 support, which locks them out of the
more advanced file system features, anyway.)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Document when ext2/3/4 features were added to the kernel in the
ext4(5) man page.
Addresses-Debian-Bug: #428361
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Enable the following security features: stack protection, fortify,
read-only relocation tables, immediate dynamic symbol binding, and
text segment ASLR by enabling position independent executable
(PIE).
Special handling is provided for shared library and statically linked
executables. For all the gory details please see:
https://lists.debian.org/debian-devel/2016/05/msg00302.html
Distributions who want to do their own special thing can set CFLAGS,
CFLAGS_SHLIB, CLFAGS_STLIB, LDFLAGS, LDFLAGS_SHLIB and LDFLAGS_STATIC
as appropriate.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
For the 1.43 release, we will not be enabling the metadata_csum
feature by default. We will leave that up to distribution vendors to
decide whether they want to be aggressive about enabling this feature
by default.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
If the fs_offset feature is present (and no "-o offset"
option is specified), e2undo performs the undo operation at
the stored offset.
Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This is useful if the filesystem is located at an arbitrary
offset instead of the beginning of a device or file.
Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
If a filesystem size is explicitly specified, it should be used without
subtracting the offset.
Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Some users will get confused and try to specify multiple -O options.
So teach mke2fs to treat "-O feature1 -O feature2" as
"-O feature1,feature2".
https://bugzilla.kernel.org/show_bug.cgi?id=117421
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Commit 2d2d799c72 tried to use parse_quota_options(), which uses
commas to separate out the quota types. Unfortunately, when parsing
extended options, commands are used to separate different extended
options.
To fix this, I've add a new support function parse_quota_type(), which
allows either commas or colons to used as a separator character, and
which manipulates a bit field to indicate which quota types should be
enabled. Eventually tune2fs should be converted to use
parse_quota_type() as well, thus obsoleting parse_quota_options(), but
that's a more complicated cleanup patch for later.
Fix a lint warning which could the number of blocks to be incorretly
printed if it exceeds 2**32.
Also fix some typos and other minor bugs in the usage message.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
If the user specifies an offset using -E offset without specifying an
explicit size, the system will use the block device (or file) size as
the default file system size. If we are using the default file system
size, subtract out the offset so the resulting file system will stay
within the block device. Also print a warning that this might not be
what the user wants.
Addresses-Debian-Bug: #803629
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Since e2image is used to capture broken fs images for debugging,
ignore checksum errors when creating the image.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Commit c8ee0d60 fixed most of these, but missed this one.
# e2image -r -p <device> - > imagefile
leads to a corrupted image due to the "Scanning inodes..."
printf going to stdout.
Reported-by: Alex Markley <alex@malexmedia.net>
Addresses-Red-Hat-Bugzilla: #1327329
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Configure the io channel with the specified offset before
calling mke2fs_discard_device(). Otherwise the data before offset
is discarded.
Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Glibc has depcreated _SVID_SOURCE and _BSD_SOURCE in favor of
_DEFAULT_SOURCE. So define _DEFAULT_SOURCE to shut up glibc 2.20
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Most libraries use the "-host" suffix when building for the host. This
patch renames all the libraries to use -host instead of _host.
Addresses-Google-Bug: #24619596
TEST=make dist
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
When adding 'libext2fs' as a library dependency from any other binary,
the binary needs to find the library headers. Users of this library
should not hard-code the include path themselves. This patch exports the
library headers on all three version of the libext2fs library and
removes the redundant include path from executables in e2fsprogs.
Addresses-Google-Bug: #23084776
TEST=mma
Signed-off-by: Theodore Ts'o <tytso@mit.edu>