History log of /system/extras/ext4_utils/make_ext4fs.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f0ee37ffded79afdb03e15ae3a69969d2b7e6079 25-Apr-2012 Colin Cross <ccross@android.com> libsparse: make API sane

Replaces the libsparse API with a sane one based on an opaque
pointer.

Change-Id: I93bc9cf9a6b912a993ef554dbe6ffe2f0f723383
/system/extras/ext4_utils/make_ext4fs.c
dc5abeee1e6fc4827ee0d5ece12aaed2dd56f4c7 24-Apr-2012 Colin Cross <ccross@android.com> Refactor sparse file support into libsparse

Minimal refactoring of output_file.c into libsparse in preparation
for completely separating libsparse from ext4_utils.

Moves output_file.c, backed_block.c, and parts of ext4_utils.c
into libsparse. The only changes to the remanining files in
ext4_utils are using the new sparse.h header, and moving the
wipe call out of output_file.c and into make_ext4fs.c.

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

Change-Id: I9af02b9bba1176174540c849f905dece8ade54d8
6ece70806883534d29a74b9785871505f71ecc1f 09-Feb-2012 Stephen Smalley <sds@tycho.nsa.gov> Extend make_ext4fs() interface to allow callers to pass selabel_handle.

Extend make_ext4fs() to allow callers to pass an selabel_handle for
labeling files in the ext4 image. Previously, this was only done
via the _internal() function. This extends the library interface
so that it can be used by the recovery and updater code for labeling
files from OTA and update packages.

Change-Id: I4f6755fe7c65b69587276d17ef5b971ebec0161f
/system/extras/ext4_utils/make_ext4fs.c
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/make_ext4fs.c
68e3dfd81ddb9367a0c3e0c72148c23a3227ed48 29-Mar-2012 Kenny Root <kroot@google.com> make_ext4fs: Allow custom filesystem configs

Before we used the "fs_config" function from
android_filesystem_config.h, but we want to use make_ext4fs with ASEC
containers which will not always be mounted in the same place.

Bug: 6258335
Change-Id: Icf62e3c46425f01434bf92a9823f8d542b0fa5b1
/system/extras/ext4_utils/make_ext4fs.c
0349bd9f14d252673a7a25767da4a80121aaaaf2 12-Jan-2012 Anatol Pomazau <anatol@google.com> Pass file descriptor instead of file name

Passing a file descriptor to make_ext4fs_internal() is more flexible.
We can use tmpfile() to create a temporary file.
tmpfile() is better than other solutions because it unlinks the file
right after creating it, so closing fd effectively removes temp file.
Thus we don't have to worry about large temp files accidently left
on the filesystem in case of the program crash.

Change-Id: Iba3758a0e13a898920d30d7fa5da696c22daa2b7
/system/extras/ext4_utils/make_ext4fs.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/make_ext4fs.c
354350e3a92955e66abd1ea15536f8b6e5e66493 04-Feb-2012 Anatol Pomazau <anatol@google.com> Revert "Pass file descriptor instead of file name"

This reverts commit 89ddaab97e9214cf331baffee2de4595ad14dc79
/system/extras/ext4_utils/make_ext4fs.c
89ddaab97e9214cf331baffee2de4595ad14dc79 12-Jan-2012 Anatol Pomazau <anatol@google.com> Pass file descriptor instead of file name

Passing a file descriptor to make_ext4fs_internal() is more flexible.
We can use tmpfile() to create a temporary file.
tmpfile() is better than other solutions because it unlinks the file
right after creating it, so closing fd effectively removes temp file.
Thus we don't have to worry about large temp files accidently left
on the filesystem in case of the program crash.

Change-Id: I44146704572c314e1d6cfca7ce918efa7fb92a7a
/system/extras/ext4_utils/make_ext4fs.c
ae4f7dccadfafc36470a3e6f3084c6cf3cc63415 03-Feb-2012 Anatol Pomazau <anatol@google.com> Revert "Pass file descriptor instead of file name"

This reverts commit 93eb1dc9e68d2e9dea94f56d8bce478c1a52b354
/system/extras/ext4_utils/make_ext4fs.c
93eb1dc9e68d2e9dea94f56d8bce478c1a52b354 12-Jan-2012 Anatol Pomazau <anatol@google.com> Pass file descriptor instead of file name

Passing a file descriptor to make_ext4fs_internal() is more flexible.
We can use tmpfile() to create a temporary file.
tmpfile() is better than other solutions because it unlinks the file
right after creating it, so closing fd effectively removes temp file.
Thus we don't have to worry about large temp files accidently left
on the filesystem in case of the program crash.

Change-Id: I44109e98854c314e1d6cfca7ce918efa7fb92a7a
/system/extras/ext4_utils/make_ext4fs.c
88833a6277f305b6a03ff29d8e9ffe717ddb4045 14-Jul-2011 Ken Sumrall <ksumrall@android.com> Round down the filesystem size to a multiple of the block size

If it's not a multiple of the block size, then errors are generated
when making sparse images. This doesn't change the size of the generated
filesystem, because partial blocks are not included in the filesystem.

Change-Id: Ifc00ef7961f651ce22c6400759eadce2775d7811
/system/extras/ext4_utils/make_ext4fs.c
107a9f161babc20daf915311146b0e864d3b4157 30-Jun-2011 Ken Sumrall <ksumrall@android.com> Bug fixes to make_ext4fs

Fix definition of uuid struct.
Properly set the block_group number in each backup copy of the superblock.
Adjust the info.total_inodes field after rounding up the inodes per block group.
Add the option -t to initialize all the inode tables. If also specified with
the -s option, use the CHUNK_TYPE_FILL sparse records to initialize them.

Change-Id: Idd8bcee1b9bde3e82ad8da89ef974fbc12d7a6c6
/system/extras/ext4_utils/make_ext4fs.c
06c35f935a7adadceb9ee326b3231f952f6ad203 01-May-2011 Colin Cross <ccross@android.com> Merge "Make inodes per group a multiple of inodes per block"
96cc54a9bbc788673b7a38c23160d137211fd983 30-Apr-2011 Colin Cross <ccross@android.com> Make inodes per group a multiple of inodes per block

Kernel version 2.6.37 and later refuse to write to filesystems
for which inodes per group is not divisible by inodes per block.
Round the inodes per group up.

Change-Id: I9eb4fb5dd616a8abfd2f1fdc4b7d05538a2fc8fe
/system/extras/ext4_utils/make_ext4fs.c
2ae7663e1e064000356ee9e49ebd08bdddc545f9 24-Mar-2011 Ken Sumrall <ksumrall@android.com> Implement poor man's exception handling to prevent errors from killling recovery

make_ext4fs was originally designed to be a standalone program, and the
error() macro calls exit() after printing a diagnostic. However, when
it was turned into a library that recovery links against, calling exit()
kills the entire recovery process, which the kernel starts back up,
which dies, and the cycle continues.

This changes make_ext4fs to use setjmp() early, and changes error to
use longjmp to return to that point. When longjmp is called, the
error handler just returns an error. If it was invoked as a standalone
program, this causes the program to exit with an error. If it was
invoked as a library function, the error return is gracefully handled
by recovery.

Change-Id: Iad50f46cac0ac399b5cdfd083d5712f88a10e48e
/system/extras/ext4_utils/make_ext4fs.c
c2470654d4b4db09a7052fc5fa108ac21f1b1948 27-Jan-2011 Colin Cross <ccross@android.com> ext4_utils: Add support for wipe option, and wipe by default in recovery

Adds a -w option to make_ext4fs, which will attempt to use the
BLKSECDISCARD ioctl to erase the partition in order to avoid
leaving old data where it could be recovered, and to improve
wear levelling after a reformat.

Also causes factory reset through recovery to do a wipe.

Change-Id: Ibe34bbd84552e526be6bd041024a950806aca6b4
/system/extras/ext4_utils/make_ext4fs.c
983fb19d83d2391b19b289fc150495d8642378c4 20-Jan-2011 Ken Sumrall <ksumrall@android.com> Change the API for make_ext4fs() to better match the user's needs

The current make_ext4fs() is renamed make_ext4fs_internal(), and a new
make_ext4fs() has a simplified interface that supports the needs of
recovery and updater packages that call it.

Change-Id: I9e897f1f442c7f5060f8623ea74c3cf6a9c023e4
/system/extras/ext4_utils/make_ext4fs.c
435a8b61e925e3efb22fce08612efe210e83f791 15-Jan-2011 Ken Sumrall <ksumrall@android.com> Add the ability to specify a reserved space size when making filesystems.

If you specify a negative length when making a filesystem, then the
filesystem size is the size of the partiton (or image file) minus
the absolute value of the negative length specified.

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

Change-Id: Ibeb2001a1ac8cfedd9fced11b17afba4940b6bd5
/system/extras/ext4_utils/make_ext4fs.c
757ace516d8e4350616b5fd10da0c982d3d5ec74 29-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Add an optional CRC chunk at the end of sparse files

Change-Id: Ibfcf1cdeab47ca13870350184abf83e530acbc07
/system/extras/ext4_utils/make_ext4fs.c
b781330b1acae2e5706bbda8d81e5f7575f40e2a 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Get rid of CRC in sparse file header

Also removes the need to seek in the output file, allowing
stdin and stdout to be used for input and output.

Change-Id: I93cbe335d9cc83a6d21daa696af2cb54952dcc9f
/system/extras/ext4_utils/make_ext4fs.c
33f96c66e9a1f2e266a75e5e84c091dffa6ef118 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Add support for >2G input files

Change-Id: I6af69d676610099d3912e90fcab3cbdc27ace4e2
/system/extras/ext4_utils/make_ext4fs.c
22742ce739a046a079b2e1b03342a25472dfa352 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Move bg_desc_reserved_blocks from aux_info to info

Change-Id: Ic635afbb8819a00ca23ba2f93413fe707e2eec87
/system/extras/ext4_utils/make_ext4fs.c
75249edab0b22ea9aae9c7278b9f2c196c7d25d4 14-Aug-2010 Ken Sumrall <ksumrall@android.com> Add support for sparse ext4 image creation.

This adds the -s option to the make_ext4fs tool, which now creates
"sparse" filesystem images, which is very useful for the large 32 Gbyte
filesystems we are now building.
This check-in also fixes make_ext4fs to properly create filesystems
larger thatn 4 Gbytes on 64-bit Linux, 32-bit android and Macs.

Change-Id: Ie5838492fcf944f5c875481693c0dbd7013deae4
/system/extras/ext4_utils/make_ext4fs.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/make_ext4fs.c
e4b5ae8ab07e698b95f004c9226000b02f853abc 03-Aug-2010 Colin Cross <ccross@android.com> Create a journal by default

Change-Id: I7ab4e502ba4a0f1f3ae85d6d25f3936f4b66e5e8
/system/extras/ext4_utils/make_ext4fs.c
263eefd9fb9608432636c903423e43848e69f39d 30-Jun-2010 Doug Zongker <dougz@android.com> add make_ext4fs to the libext4_utils

Move the bulk of make_ext4fs into libext4_utils, leaving a main() that
does only option parsing. Add reset functionality so that
make_ext4fs() can be called multiple times within a process.

Change-Id: Ia09a2385eab32bf3ca9eb9257c4f9df2c85e55be
/system/extras/ext4_utils/make_ext4fs.c
881cca2f88ddcce86483b3ba95546b5641de8c0e 21-Jun-2010 Colin Cross <ccross@android.com> Split out libext4_utils

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

Change-Id: I37da6c38cd33ae22a0578ed8e91650e35972bf6a
/system/extras/ext4_utils/make_ext4fs.c
7a8bee7653c393d8da0e28668cb51d3ccab793e8 20-Jun-2010 Colin Cross <ccross@android.com> Add support for writing a gzip compressed image

Change-Id: Ica2ff90060f6a4ced2c671084205b58eede66cdf
/system/extras/ext4_utils/make_ext4fs.c
4b83b8acdcc4dad375adaf0f3b41fc41b22ee742 18-Jun-2010 Colin Cross <ccross@android.com> Fix ifdefs for linux

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

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