History log of /system/extras/ext4_utils/contents.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9036d55be0a9bccf6721b64ba0d116d7afd66201 06-Apr-2015 Mark Salyzyn <salyzyn@google.com> ext_utils: xattr_free_space assert

Commit 636d848860e5eac4225a830706fc34d48d8cc01e failed
to modify the assert checking to compensate for the
four null bytes.

Change-Id: Iec618f94f05f8700683507a3c797521689103b5a
/system/extras/ext4_utils/contents.c
636d848860e5eac4225a830706fc34d48d8cc01e 06-Apr-2015 Mark Salyzyn <salyzyn@google.com> ext4_utils: xattr_assert_sane false positives

xattr_free_space() does not match kernel, it subtracts
sizeof(__u32) as a buffer zone to permit IS_LAST_ENTRY
to function. As documented in .../linux/fs/ext4/xattr.c:

+------------------+
| header |
| entry 1 | |
| entry 2 | | growing downwards
| entry 3 | v
| four null bytes | <<<< HERE is why sizeof(__u32)
| . . . |
| value 1 | ^
| value 3 | | growing upwards
| value 2 | |
+------------------+

Change-Id: Iee6e4e90664a3c2c5056006870b0f2f22b236bad
/system/extras/ext4_utils/contents.c
9922135de65b717267d8173f61e360fbb9cf1ebd 13-Aug-2014 Doug Zongker <dougz@google.com> fix build

inode_allocate_file_extents should return NULL if allocation fails.

Bug: 16984795
Change-Id: I7d2b9d61ca81f8e1869dbac3d8bde79bb5799fa9
/system/extras/ext4_utils/contents.c
bec598e982301bf2714d37b14e312c9845c7cc0c 12-Aug-2014 Doug Zongker <dougz@google.com> add option to make_ext4fs to record blocks for each file

Add the -B option to make_ext4fs, which causes it to record the block
ranges used for each (regular) file in the image. We can use this
information to construct more efficient block-based incremental OTAs.

Bug: 16984795
Change-Id: I2a5325bb89948f63c76e93fdfa84c51f9b050104
/system/extras/ext4_utils/contents.c
40ce87a70a064eeb462d3c3935422918c1f6114e 03-Mar-2014 Paul Lawrence <paullawrence@google.com> Remove warnings

Remove warnings called by duplicate definition of ALIGN macro.
Note that bionic/libc/include/sys/param.h defines ALIGN as

#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES)

which is not good - clashes with every other definition of ALIGN.

Change-Id: I2d716c41ededd2fa072f944e21d94a0c93ca9c46
/system/extras/ext4_utils/contents.c
7900c773815d062deb266f744f95aa76b3573fa3 23-Jan-2014 Colin Cross <ccross@android.com> ext4_utils: refactor kernel headers

Move the kernel header includes into a single include file that
can deal with getting the kernel int types correct on all
platforms.

Change-Id: Ied3dc6a0f5cbb3ceb686aa3de72f16e10a36462a
/system/extras/ext4_utils/contents.c
8a63232ae7d992c148b75a03d83df5c2188935fc 01-Mar-2013 Nick Kralevich <nnk@google.com> ext4_utils: use android_filesystem_capability.h

Change-Id: I47cb6ec2f1fcba0d076081b76335638b9c2d1789
/system/extras/ext4_utils/contents.c
192238d9081d4ad8c090a77e8e1d40b66e8fae4a 25-Feb-2013 Sungmin Choi <sungmin.choi@lge.com> ext4_utils: fix build error without FILE_CONTEXTS

After commit 4df62f342dbbe2f5cca831ce789dc0426d32ec03,
occurs segmentation fault if mkuserimg.sh runs without FILE_CONTEXTS options.
It's due to strlen() for null value. To fix it, return 0 for null.

Change-Id: Icf99706e51b9053a24e23b9d081a258962877c30
/system/extras/ext4_utils/contents.c
3ebdcb8f9378320ec126bb130f167b7b4908e605 23-Feb-2013 Nick Kralevich <nnk@google.com> Fix win_sdk build.

Change-Id: I1d1e722a533e0db99492e7fdf308f102dc4c3661
/system/extras/ext4_utils/contents.c
4df62f342dbbe2f5cca831ce789dc0426d32ec03 07-Feb-2013 Nick Kralevich <nnk@google.com> ext4_utils: add filesystem capabilities support.

Add support for specifying filesystem capabilities when
creating a new filesystem.

The combination of SELinux extended attributes plus
filesystem capability extended attributes is too big
to fit inside one inode entry. Because of this, I added
support to ext4_utils to create an xattr block and link
the inode to that block. We continue to try to fit
everything inside the inode if possible, but fall over to
creating a block if the extended attribute is too big.

Change-Id: I40ebb63975b15ecd8c565486e171b4d50cd4dfaa
/system/extras/ext4_utils/contents.c
5446bde9c02f6ae95a30d9c178b13a05bb580fe1 20-Feb-2013 Nick Kralevich <nnk@google.com> ext4_utils: clean up some warnings.

Change-Id: Ia9761e5168cfe6baabc0105ea76d5575fc378f48
/system/extras/ext4_utils/contents.c
8748938228acad9e53c4f3cdfa132d2aff7917bf 20-Nov-2012 Colin Cross <ccross@android.com> make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

When the total dentry size is N * 4096 - 4 or N * 4096 - 8, there is
not enough room in the block to insert an extra padding dentry.
Instead, switch to always padding the previous dentry out to the end
of the block, which matches what the kernel does when creating new
directory entries.

Also fix dentry_size to return the size of all the dentries
without the padding, the len + 8 padding is incorrect, and the
DIV_ROUND_UP will round up to the correct number of blocks.

Change-Id: If11f90e4ee172c135a0eae2a50b8be213e2dd0dc
/system/extras/ext4_utils/contents.c
bcfcdcf7e8b4ce14f4ec67ac11ce20bfddecffcd 17-Oct-2012 Kenny Root <kroot@google.com> Remove HAVE_SELINUX guards

Change-Id: I4808ec7455acf0f60b2ceab6ce447fd5d7eb7100
/system/extras/ext4_utils/contents.c
400e9bc8d3c449da234e70abe319bc2670c94298 31-May-2012 Kenny Root <kroot@android.com> am 47aa1049: Merge "Fixes to make_ext4fs when compiled with HAVE_SELINUX."

* commit '47aa1049e80927420b59723806fab579997a7430':
Fixes to make_ext4fs when compiled with HAVE_SELINUX.
c588b0a9db0d27926ad811eca8f32f5e4fc84cbd 31-May-2012 Matt Finifter <finifter@google.com> Fixes to make_ext4fs when compiled with HAVE_SELINUX.

Fix a segfault in contents.c.

Change-Id: I77c39b2cda5f3aa572b5ed8a4f2e5da78341eed6
/system/extras/ext4_utils/contents.c
2e5c52322d54d0f98d36b499fcaa31a0e84ca87c 31-Mar-2012 Kenny Root <kroot@google.com> resolved conflicts for merge of 8f9b41d9 to master

Change-Id: I9af02b9bba1176174540c849f905dece8ade54d8
b4eca4b24af9c80ebb2a7fa2ba539a48096b7576 13-Jan-2012 Stephen Smalley <sds@tycho.nsa.gov> Extend make_ext4fs to support setting SELinux security contexts in ext4 images.

Extend make_ext4fs with support for looking up the right security context from
the file_contexts configuration and setting it in the generated image. This is
similar to the existing support for looking up the UID/GID/mode via
android_filesystem_config.h and setting it, but via configuration rather than
defined in a header.

Change-Id: Ief9c44eeaaca4a44100a384b063f40b185469be3
/system/extras/ext4_utils/contents.c
4605b3fb8a00fa37f617a8d0fe3a095d0503a845 04-Feb-2012 Raphael Moll <raphael@google.com> Adapt ext4_utils for windows.

This is not a full port of ext4_utils for windows.
Instead it merely enables use to use the library
for the 'create an empty fs image' functionality
as used by 'fastboot format'.

Change-Id: Ia1ffacd64e4233c4fbb369c4ac5927ccd72ac526
/system/extras/ext4_utils/contents.c
7c81ec40f5f466b23c2ebacabe1e4e9ac6932bd5 01-Apr-2011 Ken Sumrall <ksumrall@android.com> Properly compute the size of a directory

When computing the size of a directory that is being created,
make sure to include the size of the null entry at the end of
the list of entries in that directory.

Change-Id: I7deb05a170911cd0cc8517600c9747f64915606f
/system/extras/ext4_utils/contents.c
2ff1c5b6e8c1457dbb65fb8305db92c74e95dd42 26-Jan-2011 Colin Cross <ccross@android.com> ext4_utils: Fix off-by-one bug in dentry size calculation

Change-Id: I1a1833dfd5d896acd1d823f8dbe925b8ff1fd5da
/system/extras/ext4_utils/contents.c
2e905e5f2a3df605c68cb8633580c918e9f4ba71 29-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Fix warnings

Change-Id: Ibeb2001a1ac8cfedd9fced11b17afba4940b6bd5
/system/extras/ext4_utils/contents.c
6bd2b5d80db5630cb73e3e5a4be3b38afa241c5a 05-Aug-2010 Colin Cross <ccross@android.com> Fix calculation of dentry size

The PAD_TO function was incorrectly handling values that were already
aligned, which could lead to overruns of the dentry block. Fix the
function, rename it to ALIGN, move it to ext4_utils.h, and use it
everywhere the dentry size is calculated.

Change-Id: Ie9778d2c6f72d3db9a3162e52882377a71b8420a
/system/extras/ext4_utils/contents.c
cf5c39c1851f8826264822414dbab31c1aeaeec6 05-Aug-2010 Colin Cross <ccross@android.com> Fix zero length files

Zero length files should just skip the block allocation so the
inode extent fields are empty.

Change-Id: I40a6ba32b0a7f842e5d752e8cd70dfda878b8998
/system/extras/ext4_utils/contents.c
de61f980c7b034eefac6e0ace718b3c1eb3f6252 05-Aug-2010 Colin Cross <ccross@android.com> Set timestamps on files based on source files

Use the modification time of the source files to set the modification
time, access time, and creation times in the filesystem image.

Change-Id: I720acba5ec435ceae92bb1653e3cc7545327b6ef
/system/extras/ext4_utils/contents.c
8aef66d2125af8de7672a12895276802fcc1948f 21-Jun-2010 Colin Cross <ccross@android.com> Fix whitespace

Change-Id: I37da6c38cd33ae22a0578ed8e91650e35972bf6a
/system/extras/ext4_utils/contents.c
ec0a2e83dc66d67addeb90e83144187691852a3e 11-Jun-2010 Colin Cross <ccross@android.com> Initial commit of ext4_utils

Change-Id: I911d5b7fd7170ec81d544850717d8e69976e272b
/system/extras/ext4_utils/contents.c