summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPat Erley <perley@cyngn.com>2016-02-04 17:16:33 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-02-08 00:29:32 -0800
commitda94576d8d28fac0947c9310ef07d0beefb420ef (patch)
tree8c7c99a1c447337ec34117375e82003f85cb3923
parentc209a0a736d5155895b6238f391f9cec3680f9de (diff)
downloadbootable_recovery-da94576d8d28fac0947c9310ef07d0beefb420ef.zip
bootable_recovery-da94576d8d28fac0947c9310ef07d0beefb420ef.tar.gz
bootable_recovery-da94576d8d28fac0947c9310ef07d0beefb420ef.tar.bz2
recovery: rename remount_for_wipe
We need to re-use this to get read access to OTA files. Change-Id: Iaab91150ff30422f25139372c5cd9076f1670bd3
-rw-r--r--roots.cpp6
-rw-r--r--roots.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/roots.cpp b/roots.cpp
index 64c12a3..3977745 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -253,7 +253,7 @@ int ensure_volume_mounted(Volume* v, bool force_rw) {
return ensure_path_mounted_at(v->mount_point, nullptr, force_rw);
}
-int remount_for_wipe(const char* path) {
+int remount_no_selinux(const char* path) {
int ret;
char *old_fs_options;
@@ -406,7 +406,7 @@ int format_volume(const char* volume, bool force) {
LOGE("format_volume failed to mount /data\n");
return -1;
}
- remount_for_wipe("/data");
+ remount_no_selinux("/data");
int rc = 0;
rc = rmtree_except("/data/media", NULL);
ensure_path_unmounted("/data");
@@ -430,7 +430,7 @@ int format_volume(const char* volume, bool force) {
if (!force && strcmp(volume, "/data") == 0 && vdc->isEmulatedStorage()) {
if (ensure_path_mounted("/data") == 0) {
- remount_for_wipe("/data");
+ remount_no_selinux("/data");
// Preserve .layout_version to avoid "nesting bug"
LOGI("Preserving layout version\n");
unsigned char layout_buf[256];
diff --git a/roots.h b/roots.h
index 2140363..32d35b3 100644
--- a/roots.h
+++ b/roots.h
@@ -31,7 +31,7 @@ Volume* volume_for_path(const char* path);
int ensure_volume_mounted(Volume* v, bool force_rw=false);
int ensure_path_mounted(const char* path, bool force_rw=false);
// Above, plus override SELinux default context
-int remount_for_wipe(const char* path);
+int remount_no_selinux(const char* path);
// 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, bool force_rw=false);