aboutsummaryrefslogtreecommitdiffstats
path: root/roots.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2010-12-19 03:38:29 -0800
committerKoushik Dutta <koushd@gmail.com>2010-12-19 03:38:29 -0800
commit4196e0fa5e0c6b2a27ee5626f4cfa22375ac6ea1 (patch)
treee4eea3be3f3640ae42103b3b70f24074705ed6fc /roots.c
parentd0fff5633c82710dcd36223291719dcfa8d73476 (diff)
downloadandroid_bootable_recovery-4196e0fa5e0c6b2a27ee5626f4cfa22375ac6ea1.tar.gz
android_bootable_recovery-4196e0fa5e0c6b2a27ee5626f4cfa22375ac6ea1.tar.bz2
android_bootable_recovery-4196e0fa5e0c6b2a27ee5626f4cfa22375ac6ea1.zip
bml devices that are using rfs are automatically upgraded to ext4. Version 3.0.0.0.
Change-Id: I069f0c5122e8d48ce311f519f08890d3e569dbb3
Diffstat (limited to 'roots.c')
-rw-r--r--roots.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/roots.c b/roots.c
index bfb828fa..45e07273 100644
--- a/roots.c
+++ b/roots.c
@@ -160,21 +160,10 @@ int ensure_path_mounted(const char* path) {
LOGE("failed to mount %s (%s)\n", v->mount_point, strerror(errno));
return -1;
} else {
- // let's just give it a shot and see what happens...
- result = mount(v->device, v->mount_point, v->fs_type,
- MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
- if (result == 0) return 0;
-
- if (v->device2) {
- LOGW("failed to mount %s (%s); trying %s\n",
- v->device, strerror(errno), v->device2);
- result = mount(v->device2, v->mount_point, v->fs_type,
- MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
- if (result == 0) return 0;
- }
-
- LOGE("failed to mount %s (%s)\n", v->mount_point, strerror(errno));
- return -1;
+ // let's try mounting with the mount binary and hope for the best.
+ char mount_cmd[PATH_MAX];
+ sprintf(mount_cmd, "mount %s", path);
+ return __system(mount_cmd);
}
LOGE("unknown fs_type \"%s\" for %s\n", v->fs_type, v->mount_point);