summaryrefslogtreecommitdiffstats
path: root/fs_mgr
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: warning fixit.Sasha Levitskiy2014-04-113-6/+6
| | | | | | | bootable/recovery has a dependent commit: I9adb470b04e4301989d128c9c3097b21b4dea431 Change-Id: Icf23e659265d71d5226d527c2b40cfbc132320ee Signed-off-by: Sasha Levitskiy <sanek@google.com>
* fs_mgr: Don't run e2fsck inside SDK system images.David 'Digit' Turner2014-02-241-7/+16
| | | | | | | | | | | | | These images do not have GPL-ed binaries like /system/bin/e2fsck so avoid running the program when we detect that we're running inside one of them. Note that this does not affect other emulator-based build products (e..g full-eng instead of sdk-eng), which do have the binaries. BUG=13057123 Change-Id: Ia42f1d02a3845fbf4b2f9d95818f35d760711a12
* fs_mgr: split fstab parsing into separate fileColin Cross2014-01-233-381/+404
| | | | | | | | Move fstab parsing into fs_mgr_fstab.c so that it compiles into a separate compilation unit. uncrypt links against it but doesn't need to pull in the rest of the dependencies on fs_mgr.c. Change-Id: I6bffe1cd42720151533e958028259d1931aaa4bf
* fs_mgr: update ext4_parse_sb to match change in ext4_utilsColin Cross2014-01-231-3/+3
| | | | | | | ext4_parse_sb now takes the struct fs_info to fill out to avoid using the global info from external callers. Change-Id: I0984ba01c0dbdd5b68b825817faf0c5cf5aa5510
* Merge "system/core 64-bit cleanup."Elliott Hughes2014-01-161-1/+2
|\
| * system/core 64-bit cleanup.Elliott Hughes2014-01-161-1/+2
| | | | | | | | | | | | | | | | | | This cleans up most of the size-related problems in system/core. There are still a few changes needed for a clean 64-bit build, but they look like they might require changes to things like the fastboot protocol. Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
* | fs_mgr: increase verboseness on mount errorsWilliam Roberts2014-01-151-6/+12
|/ | | | | | | | | | While debugging a mount error, the dmesg output was less than ideal. The error would be declared but why the mount failed, and what options were passed was not present. This patch ensures that the mount options and underlying errno are printed. Change-Id: I2b3a2c113149df878c0a8a10ef86fd9e4f909658
* Revert "fs_mgr: correct warning on unused function parameter"Nick Kralevich2014-01-151-1/+1
| | | | | | | | | | | | | | | | The build is broken. system/core/fs_mgr/fs_mgr.c:824:77: error: expected '(' before 'unused' const char *blk_device, long long length __attribute__(unused)) ^ system/core/fs_mgr/fs_mgr.c: In function 'fs_mgr_add_entry': system/core/fs_mgr/fs_mgr.c:824:56: warning: unused parameter 'length' [-Wunused-parameter] const char *blk_device, long long length __attribute__(unused)) ^ make: *** [out/target/product/generic_x86/obj/STATIC_LIBRARIES/libfs_mgr_intermediates/fs_mgr.o] Error 1 make: *** Waiting for unfinished jobs.... This reverts commit 21095d0cae64c70b4ac7e90af7a6787019cc317a. Change-Id: I64f8c4d9c17c0e3bbf2eb427a2c0b81bbe66ec3a
* fs_mgr: correct warning on unused function parameterWilliam Roberts2014-01-141-1/+1
| | | | | | | | | target thumb C: libfs_mgr <= system/core/fs_mgr/fs_mgr.c system/core/fs_mgr/fs_mgr.c: In function 'fs_mgr_add_entry': system/core/fs_mgr/fs_mgr.c:828:56: warning: unused parameter 'length' [-Wunused-parameter] const char *blk_device, long long length) Change-Id: Ide1bfa120c4f8d8e2f643929cb84c1be065e3310
* SWAP_FLAG_* constants are now in <sys/swap.h>.Elliott Hughes2014-01-071-5/+0
| | | | | Bug: 9336527 Change-Id: I77e2b05cefbfb4eebda39b4079107833f4160563
* am 397a3642: fs_mgr: check that fstab is not NULL in fs_mgr_free_fstabRom Lemarchand2013-09-241-0/+4
|\ | | | | | | | | * commit '397a3642145dbd0919f8148ff24f0cafe1714b55': fs_mgr: check that fstab is not NULL in fs_mgr_free_fstab
| * fs_mgr: check that fstab is not NULL in fs_mgr_free_fstabRom Lemarchand2013-09-241-0/+4
| | | | | | | | | | | | | | Make sure fstab is not NULL before freeing it Bug: 10911605 Change-Id: I549c0a470dd183fb15a2f3c5cf4f3dd393b6e307
* | am 6b1a0272: Merge "Create a separate copy of the fsck logs" into klp-devKen Sumrall2013-09-231-2/+5
|\ \ | |/ | | | | | | * commit '6b1a027239689a817aa5ca44a2bcbfe48ed21408': Create a separate copy of the fsck logs
| * Create a separate copy of the fsck logsKen Sumrall2013-09-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The log_target parameter of android_fork_execvp_ext() is now a bit field, and multiple targets can be set to log to multiple places at the same time. The new target LOG_FILE will log to a file specified by the new parameter file_path. Set LOG_FILE and log to a file in /dev (the only writable filesystem avilable when e2fsck runs) when invoking e2fsck in fs_mgr. Bug: 10021342 Change-Id: I63baf644cc8c3afccc8345df27a74203b44d0400
* | am 777a00e3: Merge "New fstab flags to support more expressive SD card ↵Ken Sumrall2013-09-233-0/+13
|\ \ | |/ | | | | | | | | | | permissions" into klp-dev * commit '777a00e3d193e45d928b1a26de85ae5a238271c4': New fstab flags to support more expressive SD card permissions
| * New fstab flags to support more expressive SD card permissionsKen Sumrall2013-09-203-0/+13
| | | | | | | | | | | | Bug: 10330128 Change-Id: I41fb178b839487b604762fbc1ccba097d25c7aa0
* | am c67bd8d7: am a208ea63: Merge "Fix fstab memory leak"Elliott Hughes2013-09-181-2/+4
|\ \ | | | | | | | | | | | | * commit 'c67bd8d7cd9b43a5a5ef249ea787ac9786359d22': Fix fstab memory leak
| * | Fix fstab memory leakIrina Tirdea2013-09-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading the fstab config file fails, fstab memory is not freed. When fstab structure is no longer needed, only half of it is freed. Free fstab memory in all cases (error or when it is no longer needed). Change-Id: Ib0758a5aaa69505285bf64143632986a2dbbdccb Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
* | | am c4295d9b: am 810ff696: Merge "Cleanup fs_getline from fs_mgr"Elliott Hughes2013-09-181-72/+16
|\ \ \ | |/ / | | / | |/ |/| * commit 'c4295d9b72812afbaebd7f2512c7a5bba9e7d5fa': Cleanup fs_getline from fs_mgr
| * Cleanup fs_getline from fs_mgrIrina Tirdea2013-09-181-72/+16
| | | | | | | | | | | | | | | | | | | | Since getline is included in bionic, fs_mgr can use this version instead of the one defined internally by fs_getline. Replace fs_getline with getline. Change-Id: I49b53d639bd995f051256fb7573ff6ab45d9c36d Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
* | Add basic verity support to fs_mgr.Geremy Condra2013-08-066-6/+462
| | | | | | | | | | | | | | | | | | | | | | This change adds a "verify" fs_mgr flag specifying that the device in question should be verified. Devices marked with this flag are expected to have a footer immediately after their data containing all the information needed to set up a verity instance. Change-Id: I10101f2c3240228ee0932e3767fe35e673d2e720
* | am 6b78fad1: am a9396549: Fix my incorrect merge resolution for ↵Elliott Hughes2013-07-111-10/+0
|\ \ | |/ | | | | | | | | | | 132b7d750e6f3e835676dfc5edbb94978f9370f8 harder. * commit '6b78fad147c772075eae5cfc25f5a50748bc4015': Fix my incorrect merge resolution for 132b7d750e6f3e835676dfc5edbb94978f9370f8 harder.
| * Fix my incorrect merge resolution for ↵Elliott Hughes2013-07-111-10/+0
| | | | | | | | | | | | 132b7d750e6f3e835676dfc5edbb94978f9370f8 harder. Change-Id: I3f8bc955f035b49407540053462e53b3f262d381
* | am 43564031: am 7b9c33b1: Fix my incorrect merge resolution for ↵Elliott Hughes2013-07-111-1/+1
|\ \ | |/ | | | | | | | | | | 132b7d750e6f3e835676dfc5edbb94978f9370f8. * commit '435640312ce48dab201d6f26a6258143a82f551e': Fix my incorrect merge resolution for 132b7d750e6f3e835676dfc5edbb94978f9370f8.
| * Fix my incorrect merge resolution for 132b7d750e6f3e835676dfc5edbb94978f9370f8.Elliott Hughes2013-07-111-1/+1
| | | | | | | | | | | | The conflict was the actual intended change. Change-Id: Icc9493e4b24b7b53a18e2c7406ef24a81e4d4a7b
* | am dccd7773: am 786b1232: resolved conflicts for merge of 42031e0e to ↵Elliott Hughes2013-07-111-0/+10
|\ \ | |/ | | | | | | | | | | stage-aosp-master * commit 'dccd77730754b681f3517308359a34f86aecd99f': fs_mgr_priv: Extend fs wait timeout to 20 seconds
| * resolved conflicts for merge of 42031e0e to stage-aosp-masterElliott Hughes2013-07-111-0/+10
| |\ | | | | | | | | | Change-Id: I3e6337c258b3e7fb6eee4ed8e3664a69ae219fd6
| | * Merge "fs_mgr_priv: Extend fs wait timeout to 20 seconds"Ken Sumrall2013-07-101-1/+1
| | |\
| | | * fs_mgr_priv: Extend fs wait timeout to 20 secondsAndrew Boie2013-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In practice 5 seconds is too short to wait for a disk device node to show up if the disk is USB; 20 seconds is a much more comfortable window. Change-Id: Iaf2c1f46b41a44fc1240d52d8498ca9cb639ea80 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* | | | Add support for swap entries in fstabKen Sumrall2013-07-093-42/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Swap entries can optionally specify a swapprio= or zramsize= flag in the fs_mgr flags field. Change-Id: I30530501efd4112af4e158898a9f65f6443c4fdb
* | | | fs_mgr: make block devices read-onlyNick Kralevich2013-04-241-5/+42
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a filesystem is mounted read-only, make the underlying block device read-only too. This helps prevent an attacker who is able to change permissions on the files in /dev (for example, symlink attack) from modifying the block device. In particular, this change would have stopped the LG Thrill / Optimus 3D rooting exploit (http://vulnfactory.org/blog/2012/02/26/rooting-the-lg-thrill-optimus-3d/) as that exploit modified the raw block device corresponding to /system. This change also makes UID=0 less powerful. Block devices cannot be made writable again without CAP_SYS_ADMIN, so an escalation to UID=0 by itself doesn't give full root access. adb/mount: Prior to mounting something read-write, remove the read-only restrictions on the underlying block device. This avoids messing up developer workflows. Change-Id: I135098a8fe06f327336f045aab0d48ed9de33807
* | | Include liblog in fs_mgr to fix the build.Ken Sumrall2013-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | A recent change to how libcutils is built requires liblog to be explicitly included in the link list if it's needed. Change-Id: I8547f5e65c488c8f6e314ccd4eb96606742272be
* | | fs_mgr: Capture the output of e2fsck and add to the kernel logKen Sumrall2013-04-142-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the output of e2fsck is not saved, and we have no insight into how many errors e2fsck is finding and fixing. Using the new abbreviated logging feature in liblogwrap, up to the first 100 lines, and last 4K bytes of the output of e2fsck is captured by fs_mgr, and added to the kernel log. Usually, the filesystem will be clean, and this will only add a few lines to the kernel log on boot, but when things go wrong, it should save enough to indicate what the problem is, without potentially filling the kernel log with only e2fsck output if the filesystem is really corrupted. Change-Id: I9c264798e6fe721c8f818b5ce15d0975027ddbdd
* | | fs_mgr: add support for new recoveryonly flagKen Sumrall2013-02-222-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | If a device has an ext4 partition that contains the radio firmware, and that filesystem is not mounted in normal operation, we need a flag to prevent mount_all from mounting it, so the new flag recoveryonly was added. Change-Id: I361800c494e751b04c4faf956870f15fd0d8fe20
* | | fs_mgr: support a unified fstab format.Ken Sumrall2013-02-194-103/+288
|/ / | | | | | | | | | | | | Update fs_mgr to support more flags needed to unify the 3 fstabs currently in android into one. Change-Id: Ie46cea61a5b19882c55098bdd70f39e78fb603be
* | am 7fd51b36: am b20fa762: Merge "Fix fs_mgr to properly invoke e2fsck on ↵Ken Sumrall2012-11-121-2/+2
|\ \ | |/ |/| | | | | | | | | encrypted devices" into jb-mr1.1-dev * commit '7fd51b36dabedee4de159213237e71ba20865812': Fix fs_mgr to properly invoke e2fsck on encrypted devices
| * Fix fs_mgr to properly invoke e2fsck on encrypted devicesKen Sumrall2012-11-061-2/+2
| | | | | | | | Change-Id: Ie220f5cb7b614a48ec8afe66f4721ede3a368166
* | am cfd7c2a0: am 1c0c5250: Merge "Rename getline to fs_getline for fs_mgr"Elliott Hughes2012-09-261-3/+3
|\ \ | |/ |/| | | | | * commit 'cfd7c2a05166a3ff27b2145b007834408d95a2e0': Rename getline to fs_getline for fs_mgr
| * am 1c0c5250: Merge "Rename getline to fs_getline for fs_mgr"Elliott Hughes2012-09-261-3/+3
| |\ | | | | | | | | | | | | * commit '1c0c52503dcedff1a75775bf8bfffe7ec77b722b': Rename getline to fs_getline for fs_mgr
| | * Rename getline to fs_getline for fs_mgrIrina Tirdea2012-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fs_mgr defines its own version of getline and uses it internally. This leads to a build error if getline is also defined in bionic, since fs_mgr will see readline as defined internally. Rename getline in fs_mgr to a local name (fs_getline) so that there will no longer be any conflicts. This is needed it we want to add getline in bionic. Change-Id: I3a32be71a645e122629802d98ff8f9ab9c419e86 Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
* | | Support shared-subtree and bind mount flags.Jeff Sharkey2012-08-141-0/+6
|/ / | | | | | | | | Bug: 6925012 Change-Id: Id8d887d17c6b1b2f90cfd1a1de991ccaba730b7d
* | Mount/unmount filesystems before running e2fsckKen Sumrall2012-07-241-3/+24
|/ | | | | | | This works around a performance problem in the firmware of some emmc chips. Change-Id: Ia414b4604d11e47ce9cb3f86ac82602e081bb09e
* A filesystem manager library to mount filesystems for init.Ken Sumrall2012-05-015-0/+860
Instead of specifying in init what to mount, and having various hacks in init itself to deal with encryption, use a filesystem manager library to do the work, that can also be invoked by vold when mounting an encrypted volume. Keep all the magic filesystem info an a device specific fstab file. Change-Id: Ib988f1e4fb0638ba1d5fd98407fa6d8cf862aaca