diff options
author | Doug Zongker <dougz@google.com> | 2013-08-21 01:03:25 +0200 |
---|---|---|
committer | Doug Zongker <dougz@google.com> | 2013-08-21 22:44:35 +0200 |
commit | 239ac6abac4524be93fce710360c0512c6cc2ab3 (patch) | |
tree | 55428f9ad654b63d4002ca94902440648c955b96 /roots.cpp | |
parent | notify about pending long press (diff) | |
download | android_bootable_recovery-239ac6abac4524be93fce710360c0512c6cc2ab3.tar android_bootable_recovery-239ac6abac4524be93fce710360c0512c6cc2ab3.tar.gz android_bootable_recovery-239ac6abac4524be93fce710360c0512c6cc2ab3.tar.bz2 android_bootable_recovery-239ac6abac4524be93fce710360c0512c6cc2ab3.tar.lz android_bootable_recovery-239ac6abac4524be93fce710360c0512c6cc2ab3.tar.xz android_bootable_recovery-239ac6abac4524be93fce710360c0512c6cc2ab3.tar.zst android_bootable_recovery-239ac6abac4524be93fce710360c0512c6cc2ab3.zip |
Diffstat (limited to 'roots.cpp')
-rw-r--r-- | roots.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -202,3 +202,22 @@ int format_volume(const char* volume) { LOGE("format_volume: fs_type \"%s\" unsupported\n", v->fs_type); return -1; } + +int setup_install_mounts() { + if (fstab == NULL) { + LOGE("can't set up install mounts: no fstab loaded\n"); + return -1; + } + for (int i = 0; i < fstab->num_entries; ++i) { + Volume* v = fstab->recs + i; + + if (strcmp(v->mount_point, "/tmp") == 0 || + strcmp(v->mount_point, "/cache") == 0) { + if (ensure_path_mounted(v->mount_point) != 0) return -1; + + } else { + if (ensure_path_unmounted(v->mount_point) != 0) return -1; + } + } + return 0; +} |