aboutsummaryrefslogtreecommitdiffstats
path: root/roots.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2012-06-17 20:22:22 -0700
committerKoushik Dutta <koushd@gmail.com>2012-06-17 20:54:09 -0700
commit5ff9d87fba783436e0301e230105ca24ece9b544 (patch)
tree6a6b5463d1c6a5bd75a71d0c19da2c11a7156ec9 /roots.c
parent407183abda027c35b35d4ac7ac43745e70ed1ffa (diff)
downloadandroid_bootable_recovery-5ff9d87fba783436e0301e230105ca24ece9b544.tar.gz
android_bootable_recovery-5ff9d87fba783436e0301e230105ca24ece9b544.tar.bz2
android_bootable_recovery-5ff9d87fba783436e0301e230105ca24ece9b544.zip
fix up datamedia volume detection
Change-Id: Ia853e31e31aebce9e70b1e9500930b14a92ee4bf
Diffstat (limited to 'roots.c')
-rw-r--r--roots.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/roots.c b/roots.c
index 917af0b0..1145ff95 100644
--- a/roots.c
+++ b/roots.c
@@ -219,13 +219,8 @@ void setup_data_media() {
}
int is_data_media_volume_path(const char* path) {
- int i;
- for (i = 0; i < num_volumes; i++) {
- Volume* vol = device_volumes + i;
- if (strcmp(vol->fs_type, "datamedia") == 0 && strstr(vol->mount_point, path) == vol->mount_point)
- return 1;
- }
- return 0;
+ Volume* v = volume_for_path(path);
+ return strcmp(v->fs_type, "datamedia") == 0;
}
int ensure_path_mounted(const char* path) {