summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-01-18 22:05:47 +0100
committerDees_Troy <dees_troy@teamw.in>2013-01-18 22:06:09 +0100
commit4bb33ac46bd5c632b565f95c9845a19e0cccf6a2 (patch)
tree942b003b051812fad0e2e0ac403a7c63e4401b9a
parentMove backup folder creation to after free space calc (diff)
downloadandroid_bootable_recovery-4bb33ac46bd5c632b565f95c9845a19e0cccf6a2.tar
android_bootable_recovery-4bb33ac46bd5c632b565f95c9845a19e0cccf6a2.tar.gz
android_bootable_recovery-4bb33ac46bd5c632b565f95c9845a19e0cccf6a2.tar.bz2
android_bootable_recovery-4bb33ac46bd5c632b565f95c9845a19e0cccf6a2.tar.lz
android_bootable_recovery-4bb33ac46bd5c632b565f95c9845a19e0cccf6a2.tar.xz
android_bootable_recovery-4bb33ac46bd5c632b565f95c9845a19e0cccf6a2.tar.zst
android_bootable_recovery-4bb33ac46bd5c632b565f95c9845a19e0cccf6a2.zip
Diffstat (limited to '')
-rw-r--r--partition.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/partition.cpp b/partition.cpp
index 14d5e8490..291f6baa5 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -997,6 +997,7 @@ void TWPartition::Check_FS_Type() {
char* blk;
char* arg;
char* ptr;
+ int type_found = 0;
if (Fstab_File_System == "yaffs2" || Fstab_File_System == "mtd" || Fstab_File_System == "bml" || Ignore_Blkid)
return; // Running blkid on some mtd devices causes a massive crash or needs to be skipped
@@ -1025,35 +1026,33 @@ void TWPartition::Check_FS_Type() {
{
arg = ptr;
while (*ptr > 32) ptr++;
- if (*ptr != 0)
- {
+ if (*ptr != 0) {
*ptr = 0;
ptr++;
}
- if (strlen(arg) > 6)
- {
- if (memcmp(arg, "TYPE=\"", 6) == 0) break;
+ if (strlen(arg) > 6) {
+ if (memcmp(arg, "TYPE=\"", 6) == 0) {
+ type_found = 1;
+ break;
+ }
}
- if (*ptr == 0)
- {
+ if (*ptr == 0) {
arg = NULL;
break;
}
}
- if (arg && strlen(arg) > 7)
- {
+ if (type_found) {
arg += 6; // Skip the TYPE=" portion
arg[strlen(arg)-1] = '\0'; // Drop the tail quote
- }
- else
+ if (Current_File_System != arg) {
+ LOGI("'%s' was '%s' now set to '%s'\n", Mount_Point.c_str(), Current_File_System.c_str(), arg);
+ Current_File_System = arg;
+ }
+ } else
continue;
- if (Current_File_System != arg) {
- LOGI("'%s' was '%s' now set to '%s'\n", Mount_Point.c_str(), Current_File_System.c_str(), arg);
- Current_File_System = arg;
- }
}
return;
}