Age | Commit message (Collapse) | Author |
|
Test: m host
Change-Id: I8b0edfe2076531bd4c4f1023b1076aec5f722a44
From AOSP commit: d4356bb606dbcad0b77788318c6199081262b373
|
|
Bug: 62815515
Test: lunch full-eng; make checkbuild
Change-Id: I1751669c4ed046c22587938e04eb76abe8553a8d
From AOSP commit: a24084ceb74c84b0943c86deb5cb99a63d3c46d7
|
|
Change-Id: I23b7abc8af87d87786523944186de1321726a529
From AOSP commit: 424fa8ce373566040ae6ba31151bfbef566b7166
|
|
Bug: 64272984
Change-Id: Idc727e556a3fa7fb85ff0f845b9452c8c033c22d
From AOSP commit: 131d29f6a826438aff0e5870fb3711358d2a0988
|
|
Added O_BINARY to open output files on windows, otherwise they're
written as text files and have invalid data.
Use '(filename):block_count:block_size' for sparse file name because
windows file name can contain ':', e.g. 'c:\output_file'.
Bug: 23686092
Change-Id: I731c13e5df0be8c831464c431b8949d33438fb24
From AOSP commit: 0dcf8ec6a429ce4f024fe7838fee2d5636e8ba4d
|
|
Statically link those two binaries for host build so that we can
package them with fastboot without including other library files.
Bug: 35219933
Change-Id: Ic4762ba5eda8ac61723a2c4137690d12a0aa57f2
From AOSP commit: 42297fb01aa2a49ead938c1d24868941a39fd434
|
|
When e2fsdroid runs on device, location of selinux file contexts
should be determined by libselinux instead of using arbitrary paths.
Bug: 35219933
Change-Id: I413b198422eddb212599498b532ba2c4d8bb36c6
From AOSP commit: c0bd89b31a7719dd3d51137b3d47a9597ba6b038
|
|
Bug: 35219933
Change-Id: I84f105cafc57c513d83d9e4d26e9e67ef805e33e
From AOSP commit: 834180cc81c100f264d4f96a2776c51a99a810f8
|
|
These typos were found by Sebastian Rasmussen <sebras@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
|
|
This patch is a major update to how we decide where to put extended
attributes. The main motivation is to enable creating values in
extended attribute inodes. While doing this, we want to implement a
behavior that is as close to kernel as possible.
Existing set ea code deviates from kernel behavior which makes it harder
to implement ea_inode feature:
- kernel only sorts ea entries in xattr block, e2fsprogs implementation
sorts all entries on every update.
- e2fsprogs implementation shuffled things on every update so the order
of updates does not matter. Kernel does not reshuffle things.
- e2fsprogs could evacuate entries from inode body to xattr block and
vice versa. This behavior does not exist in kernel.
Such differences could lead to inconsistent behavior between fuse2fs and
a kernel mount.
With ea_inode feature, we also need to decide whether to put a value
in an inode or keep it 'inline'. In kernel implementation this
depends on current placement of entries.
To close the behavioral gap, ext2fs_xattr_set() now takes over the
decision about where to place ea values. This also allows it to raise
errors early instead of delaying them to a separate
ext2fs_xattrs_write() call later.
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
fs_mgr formats /data without src_dir.
Test: zero-out first 4096 bytes on /data partition and reboot
Bug: 35219933
Change-Id: I12f1eb1002fd96d18fc7a9ae5a529f673eb57273
From AOSP commit: b5330546f444b49c4d751e9ddd7677ae97161f0c
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Support passing a string of multiple selinux file contexts separated by
comma with -S option.
E.g. e2fsdroid -S ctx1,ctx2 output
Test: make systemimage
Bug: 35219933
Change-Id: Icc0f9d5d6180b5db7d68f7de45a1128f5a20be89
From AOSP commit: 34f4f33b24280c0a21a95407da4cf4988b275c95
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Change-Id: I4b38841c9c36a8faaa9f65bc7b61c7abdddab094
Signed-off-by: Ben Fennema <fennema@google.com>
From AOSP commit: cc933ab3bfee821dc885fe5a6bbb2a4997304ff9
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
The new kernel headers do:
#define __bitwise __bitwise__
However, the code redefines __bitwise without undef'ing it first.
This is a temporary fix, b/35721782 filed to fix this.
Change-Id: I2c6a64146966f1737835f012d24ccc844570d02b
Test: Builds without warningers/errors.
From AOSP commit: commit 91581e8f15b8a29aedea3e7c11162301c7e66ec3
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>
|
|
If selabel_lookup fails, the current implementation of set_selinux_xattr
returns -1, but the command line tool e2fsdroid reports success.
There's a bunch of things wrong:
1) -1 does not appear to be a legal errcode_t value. The appropriate
return value appears to be DIRENT_ABORT.
2) A return value of DIRENT_ABORT is ignored by the upper layers of the
code.
3) Attempting to fix the upper layers of the code to not ignore
DIRENT_ABORT results in complaints about not being able to create
/lost+found.
Call stack:
- main
- android_configure_fs
- __android_configure_fs
- ext2fs_dir_iterate2
- ext2fs_block_iterate3
- ext2fs_process_dir_block
- walk_dir
- ext2fs_dir_iterate2
- ext2fs_block_iterate3
- ext2fs_process_dir_block
- walk_dir
- ext2fs_dir_iterate2
- ext2fs_block_iterate3
- ext2fs_process_dir_block
- androidify_inode
- set_selinux_xattr
I'm honestly not sure how to fix this, so just throw an exit(1) in
there, to make sure the program dies a horrible death if
selabel_lookup() fails. This is much better than the alternative of
e2fsdroid returning success with an improperly labeled file.
Bug: 34358308
Test: Artifically modify selabel_lookup() to return a failure, and
verify Android doesn't compile.
Test: Verify Android compiles under normal circumstances.
Change-Id: I60e04bc6559a66d3f3202f2c28e2519856385ded
From AOSP commit: 87a7db7cf2ca0feecaccad94bf22f92c726000c3
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Bug: 34220783
Change-Id: I218ab40f423bf0bddebc3b2e1526bd9e3549eed6
From AOSP commit: 92d281bd3145e149d7330272b1704d77191482c4
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Returns error back to caller (build system) instead of failing silently.
Change-Id: I8bad9eed6fe639014126c98c6bf02e539f086a98
From AOSP commit: 948b9fecf8f92785a171c9416080e0660f089deb
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Timestamp was incorrectly set to -1 or left unset. Use lstat to read
timestamps from source files and set on target files.
Change-Id: I66b2c5281ae769a52bc4e1638895eb5285c18b7a
From AOSP commit: d882f1e23195d1fb16a6fe1887c842d04ab420b7
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Android build runs e2fsdroid in a tmp directory. Use absolute path
to access files in product_out.
Change-Id: Ic238d93ff68f03bd82245bda127d269972f5ef63
From AOSP commit: bc02ac42b26836f22579a81edb5711cae837732f
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Extra "/" causes problem when matching entries in fs_config.
Change-Id: Ie1659b98db3d599cdd1a832d2dfb3036d399a6e3
From AOSP commit: 7fe49140ef755e98607a67199971c01ed6a96930
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Fixes the "asprintf undeclared" warning in this code.
Bug: N/A
Test: builds
Change-Id: I42e1bfbdbc0391c5e5d7908204f9064ec858c84d
From AOSP commit: 1ebca4b43115846af705bd320bccb8f930e328c8
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
This tool converts ext images to android sparse images.
Test: ext2simg img.ext4 img.sparse
simg2img img.sparse img2.ext4
e2fsck -f img.ext; e2fsck -f img2.ext
cmp img{,2}.ext
Change-Id: I7ec6f126160dacafb0946ba99f07d4bb42a19c45
From AOSP commit: c1b7d19958dc3dbe53810811ea3dcc4f04f85c73
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Add an option to read a base_fs file and allocate the blocks according
to the mapping provided by the file.
Test: 1/ Create a normal image and an incremental one.
Compare the number of blocks that have changed.
2/ Create an image.
Create an incremantal image.
The basefs file and the block_list file are the same.
Change-Id: Ie000ca48cf000d95e7a45a9752699abfc7484b6c
From AOSP commit: 16babe7b79c4c9b6d75d60e30c04a8e24278e4fa
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Set the permissions and the extended attributes as defined by fs_config
and selinux.
Test: create an image with make_ext4 and with mke2fs + e2fsdroid
Compare the output of:
for f in `find . | sort`; do
xattr -l "$f"; md5sum "$f" ls -lah "$f"
done
Change-Id: I64c97f81c7f5e2bcf3cee3431e410d064cf0735a
From AOSP commit: 4c1e1f46301b3ff7f60be1d8e943ecc23b917ca7
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Test: make_ext4 and e2fsdroid both generate the same list of file.
Change-Id: Idaf42b64b588824d453bc204562ccbe702de26a9
From AOSP commit: 0fe9949ca0cae4be6cde69e084db922506eda11a
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Add an option to generate a block_list file from an existing ext4 or sparse
image.
Test: make_ext4 and e2fsdroid both generate the same list of file.
Change-Id: I5ecc6521797397102904bf510c283dfd50a72721
From AOSP commit: fdc29bee07aef3a379f3ec3ccbaa551ff6500bff
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Disable building debugfs and e4crypt on mac.
Add missing time.h include in ext2fs.h for time_t.
From AOSP commit: f2b2d2c0a6af8bd1e1a19150cf9d41d8f2b0e39a
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>
|
|
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>
|
|
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
The dir2fs script converts a directory into a minimized ext4 filesystem.
FS creation parameters are tweaked to reduce as much FS overhead as
possible, and to leave as few unused blocks and inodes as possible.
Given that mke2fs -d lays out files linearly from the beginning of the
FS, using resize2fs -M is not as horrible as it usually is.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Add a script that handles (most) of the code massaging necessary to resync
{recovery,revoke}.c from the Linux kernel into e2fsprogs.
Usage: jbd2-resync.sh linux/fs/jbd2/revoke.c e2fsprogs/e2fsck/revoke.c
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
The -t option is documented as deprecated in GNU's mktemp, and
FreeBSD's mktemp doesn't support it at all.
Replace it with the construct "mktemp ${TMPDIR:-/tmp}/foo.XXXXXX"
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
This script uses debugfs command to populate the ext2/3/4 filesystem
from a given directory, it is a little similar to genext2fs, but this
one fully supports ext3 and ext4.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Declare the internal symbols alloc_dirstruct() and cache_dirstruct()
as static so they don't leak out into the global namespace.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
This is part of a series of improvements from a 2008 version of
spd_readdir.c that somehow didn't make it into the version which we
checked into e2fsprogs git tree.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
This is part of a series of improvements from a 2008 version of
spd_readdir.c that somehow didn't make it into the version which we
checked into e2fsprogs git tree.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Also fix the -o option so it works correctly (instead of core
dumping).
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
This is necessary to preserve the i_size of the output file; otherwise
programs like e2fsck will complain that the filesystem has been
truncated.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|