From abb8f7785ee24eac42f6d28dbfef37872a06c7e9 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 30 Jul 2015 14:43:27 -0700 Subject: recovery: Allow "Mount /system" for system_root_image. When system images contain the root directory, there is no entry of "/system" in the fstab. Change it to look for "/" instead if ro.build.system_root_image is true. We actually mount the partition to /system_root instead, and create a symlink to /system_root/system for /system. This allows "adb shell" to work properly. Bug: 22855115 Change-Id: Ibac493a5a9320c98ee3b60bd2cc635b925f5454a --- roots.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'roots.h') diff --git a/roots.h b/roots.h index 230d9ded3..6e3b24355 100644 --- a/roots.h +++ b/roots.h @@ -19,10 +19,6 @@ #include "common.h" -#ifdef __cplusplus -extern "C" { -#endif - // Load and parse volume data from /etc/recovery.fstab. void load_volume_table(); @@ -33,7 +29,10 @@ Volume* volume_for_path(const char* path); // success (volume is mounted). int ensure_path_mounted(const char* path); -// Make sure that the volume 'path' is on is mounted. Returns 0 on +// Similar to ensure_path_mounted, but allows one to specify the mount_point. +int ensure_path_mounted_at(const char* path, const char* mount_point); + +// Make sure that the volume 'path' is on is unmounted. Returns 0 on // success (volume is unmounted); int ensure_path_unmounted(const char* path); @@ -46,8 +45,4 @@ int format_volume(const char* volume); // mounted (/tmp and /cache) are mounted. Returns 0 on success. int setup_install_mounts(); -#ifdef __cplusplus -} -#endif - #endif // RECOVERY_ROOTS_H_ -- cgit v1.2.3 From d0db337d727707977fa562bcc492b27270e67937 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Thu, 5 Nov 2015 13:38:40 -0800 Subject: Create convert_fbe breadcrumb file to support conversion to FBE Change-Id: I38b29e1e34ea793e4b87cd27a1d39fa905fddf7a --- roots.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'roots.h') diff --git a/roots.h b/roots.h index 6e3b24355..a14b7d971 100644 --- a/roots.h +++ b/roots.h @@ -41,6 +41,12 @@ int ensure_path_unmounted(const char* path); // it is mounted. int format_volume(const char* volume); +// Reformat the given volume (must be the mount point only, eg +// "/cache"), no paths permitted. Attempts to unmount the volume if +// it is mounted. +// Copies 'directory' to root of the newly formatted volume +int format_volume(const char* volume, const char* directory); + // Ensure that all and only the volumes that packages expect to find // mounted (/tmp and /cache) are mounted. Returns 0 on success. int setup_install_mounts(); -- cgit v1.2.3