summaryrefslogtreecommitdiff
path: root/ext4_utils/contents.c
AgeCommit message (Collapse)Author
2016-10-09ext4_utils: Export headers for libext4_utils* libs.Tao Bao
So we can do "#include <ext4_utils/make_ext4fs.h>" without adding "LOCAL_C_INCLUDES += system/extras/ext4_utils". Also clean up the #include lines in system/extras/ext4_utils/. Test: `m checkbuild` works. Change-Id: I3c8b07c9b6f5996160e0cb6d9d069579b1609f60 (cherry picked from commit 018ef1be61e749d0fbe0f05179a4f0f9b858ae57)
2016-10-05Test for _WIN32 in system/extras instead of USE_MINGW.Elliott Hughes
Bug: http://b/23392815 Test: builds Change-Id: Ide007c7ac8414a82548cc99fe384c7de9ba7494b
2015-07-31Use __ANDROID__ instead of HAVE_ANDROID_OS.Elliott Hughes
Change-Id: Iee986b6c91b5877155609297c2bd17301ff91d5c
2015-04-06ext_utils: xattr_free_space assertMark Salyzyn
Commit 636d848860e5eac4225a830706fc34d48d8cc01e failed to modify the assert checking to compensate for the four null bytes. Change-Id: Iec618f94f05f8700683507a3c797521689103b5a
2015-04-06ext4_utils: xattr_assert_sane false positivesMark Salyzyn
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
2014-08-12fix buildDoug Zongker
inode_allocate_file_extents should return NULL if allocation fails. Bug: 16984795 Change-Id: I7d2b9d61ca81f8e1869dbac3d8bde79bb5799fa9
2014-08-12add option to make_ext4fs to record blocks for each fileDoug Zongker
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
2014-03-03Remove warningsPaul Lawrence
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
2014-01-23ext4_utils: refactor kernel headersColin Cross
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
2013-03-01ext4_utils: use android_filesystem_capability.hNick Kralevich
Change-Id: I47cb6ec2f1fcba0d076081b76335638b9c2d1789
2013-02-25ext4_utils: fix build error without FILE_CONTEXTSSungmin Choi
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
2013-02-22Fix win_sdk build.Nick Kralevich
Change-Id: I1d1e722a533e0db99492e7fdf308f102dc4c3661
2013-02-20ext4_utils: add filesystem capabilities support.Nick Kralevich
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
2013-02-20ext4_utils: clean up some warnings.Nick Kralevich
Change-Id: Ia9761e5168cfe6baabc0105ea76d5575fc378f48
2012-11-20make_ext4fs: fix dentry padding when dentry size is 4088 or 4092Colin Cross
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
2012-10-16Remove HAVE_SELINUX guardsKenny Root
Change-Id: I4808ec7455acf0f60b2ceab6ce447fd5d7eb7100
2012-05-31am 47aa1049: Merge "Fixes to make_ext4fs when compiled with HAVE_SELINUX."Kenny Root
* commit '47aa1049e80927420b59723806fab579997a7430': Fixes to make_ext4fs when compiled with HAVE_SELINUX.
2012-05-31Fixes to make_ext4fs when compiled with HAVE_SELINUX.Matt Finifter
Fix a segfault in contents.c. Change-Id: I77c39b2cda5f3aa572b5ed8a4f2e5da78341eed6
2012-03-30resolved conflicts for merge of 8f9b41d9 to masterKenny Root
Change-Id: I9af02b9bba1176174540c849f905dece8ade54d8
2012-03-30Extend make_ext4fs to support setting SELinux security contexts in ext4 images.Stephen Smalley
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
2012-02-16Adapt ext4_utils for windows.Raphael Moll
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
2011-03-31Properly compute the size of a directoryKen Sumrall
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
2011-01-25ext4_utils: Fix off-by-one bug in dentry size calculationColin Cross
Change-Id: I1a1833dfd5d896acd1d823f8dbe925b8ff1fd5da
2011-01-05ext4_utils: Fix warningsColin Cross
Change-Id: Ibeb2001a1ac8cfedd9fced11b17afba4940b6bd5
2010-08-05Fix calculation of dentry sizeColin Cross
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
2010-08-04Fix zero length filesColin Cross
Zero length files should just skip the block allocation so the inode extent fields are empty. Change-Id: I40a6ba32b0a7f842e5d752e8cd70dfda878b8998
2010-08-04Set timestamps on files based on source filesColin Cross
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
2010-06-20Fix whitespaceColin Cross
Change-Id: I37da6c38cd33ae22a0578ed8e91650e35972bf6a
2010-06-16Initial commit of ext4_utilsColin Cross
Change-Id: I911d5b7fd7170ec81d544850717d8e69976e272b