When building a static exectuable for "arm", the libgcc is automatically
included by the build system *after* libc, but libgcc has some symbol
dependencies on "libc", like for example the "raise" symbol.
libgcc, libatomic and libcompiler_rt-extras are passed in a group
(enclosed by --start-group and --end-group) so they all are included
regardless of the order inside that group. Nevertheless libc only
appears outside this group and before them, so the undefined references
from libgcc are not resolved.
This patch adds "libc" as a explicit static_libs dependency to
static_executable targets forcing it to be included in the group.
Bug: 34220783
Test: mmma external/e2fsprogs
Change-Id: Ia18db10da0f18494600d7e0c870291902d71b287
From AOSP commit: b799ad178fa18c2925a283206496d3f5d6e87f35
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This patch also removes all the "-host" and "_static" suffix from all
the libraries adding "unique_host_soname: true". This prevents
confusions with the host installed libraries.
A new "libext2_misc" library is introduced to export some files from
the misc/ directory to other binaries in this project.
Bug: 34220783
Test: mmma external/e2fsprogs
Change-Id: Ia1b689991346b11f8cb38f7c6ee356e666e01d6d
From AOSP commit: 7a9e1a96766d31a41b88f0a539fcc3d532b5c530
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The minor/major/makedev macros are not entirely standard. glibc has had
the definitions in sys/sysmacros.h since the start, and wants to move away
from always defining them implicitly via sys/types.h (as this pollutes the
namespace in violation of POSIX). Other C libraries have already dropped
them. Since the configure script already checks for this header, use that
to pull in the header in files that use these macros.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Don't run tests which take longer than 20 seconds to run (especially
f_large_dir, whose run time is well over ten minutes) for "make
check". The new "make fullcheck" will run all of the regression tests
for e2fsprogs.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This patch removes i_dir_acl macros and macros users.
Now stucture field can be accessed as i_size_high. This field
is useful for largedir feature.
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Fix the various compiler warnings that have crept in, and only define
__bitwise if the system headers haven't already done so. Linux 4.10
changes the __bitwise definition so that our redefinition here is
just different enough that gcc complains.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Allow debugfs to open file systems with a bad checksum, and teach the
show_super_stats command to print the expected checksum value.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Move the code to list the journal superblock information to libe2p, so
it can be used by debugfs, and so we don't have two copies of
substantially the same code in dumpe2fs.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Make the minor changes required so the list_quota and get_quota commands
can report project quota information. This also fixes a debugfs
segfault that currently occurs when either list_quota or get_quota is
invoked with an unknown quota_type argument.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
ext2fs_xattr_[sg]et() will now translate the Posix ACL xattrs to and
from the internal ext4 attr format, since the callers of the libext2fs
are much more likely to want to use the public Posix ACL format.
For debugfs and those applications that want to see the on-disk
format, the new ext4fs_xattr_flags() function will allow those callers
to request the raw format.
Addresses-Launchpad-Bug: #1645232
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Use the new C string printing routine, and allow ea_get command to
display the system.data extended attribute. Also allow the user to
explicitly request that the string be printed using hex values.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The quota support code must must not try to handle the project quota
if the the project feature is not enabled.
Problem detected by ASAN.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
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>
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>
For systems that don't use GNU's getopt(3), options have to be before
all non-option arguments. So change the usage message for debugfs's
ea_set command, and then fix the d_xattr_sorting test.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Previously "rdump / /tmp/out" would fail with the error message:
rdump: File exists while making directory /tmp/out/
Also fix the fast symlink detection logic so that it works when a
symlink has one or more extended attributes.
Addresses-Debian-Bug: #766125
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
If the journal superblock is corrupt and the user declines to fix it
(or runs e2fsck -n), make sure the error messages are clear and
explain that e2fsck cannot (safely) proceed.
Addresses-Debian-Bug: #768162
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>
Allow the filesystem to store the metadata checksum seed in the
superblock and add an incompat feature to say that we're using it.
This enables tune2fs to change the UUID on a mounted metadata_csum
FS without having to (racy!) rewrite all disk metadata.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
If MMP is not enabled on a filesystem (s_mmp_block == 0), print this
clearly rather than "MMP: block number beyond filesystem range".
Add an option to "debugfs dump_mmp" to specify the MMP block number
instead of getting it from the superblock s_mmp_block field.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This patch adds project quota support. An new quota type PRJQUOTA(2)
is added. EXT4_PRJ_QUOTA_INO(11) is reserved for project quota inode.
The super block reservers an field s_prj_quota_inum for saving
project quota inode. And each inode adds an internal field i_projid
for saving its project ID.
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Project quota related fields are reserved in Linux kernel.
As a preparation for it, this patch cleans up quota codes
of e2fsprogs so as to make it easier to add new quota type(s).
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This code is partially derived from patches from David Turner to allow
debugfs to properly support extended timestamps.
Cc: David Turner <novalis@novalis.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Create separate predicate functions to test/set/clear feature flags,
thereby replacing the wordy old macros. Furthermore, clean out the
places where we open-coded feature tests.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The quota code required that we included dict.o in libsupport.a, so we
might as well just move dict.c and dict.h to lib/support, and then
have e2fsck use the version of dict.c in libsupport.a. This
simplifies the build system and eliminates having two identical copies
of dict.o floating around in the build tree.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The check_plausibility() function is now used all over the place, so
we should move the plausible.c file to lib/support and remove the
special case handling for that file that had been in the build system.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>