summaryrefslogtreecommitdiffstats
path: root/partition.cpp
diff options
context:
space:
mode:
authorthat <github@that.at>2014-09-21 23:13:02 +0200
committerDees Troy <dees_troy@teamw.in>2014-11-04 15:33:04 +0100
commitd43bf2dc77382219069eafcc9a6490eddfa0776a (patch)
treeb713ad7caba2e5874660cb0cd1453a519fb1f21e /partition.cpp
parentpartitionmanager: remove unused By_Block and By_Name methods (diff)
downloadandroid_bootable_recovery-d43bf2dc77382219069eafcc9a6490eddfa0776a.tar
android_bootable_recovery-d43bf2dc77382219069eafcc9a6490eddfa0776a.tar.gz
android_bootable_recovery-d43bf2dc77382219069eafcc9a6490eddfa0776a.tar.bz2
android_bootable_recovery-d43bf2dc77382219069eafcc9a6490eddfa0776a.tar.lz
android_bootable_recovery-d43bf2dc77382219069eafcc9a6490eddfa0776a.tar.xz
android_bootable_recovery-d43bf2dc77382219069eafcc9a6490eddfa0776a.tar.zst
android_bootable_recovery-d43bf2dc77382219069eafcc9a6490eddfa0776a.zip
Diffstat (limited to '')
-rw-r--r--partition.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/partition.cpp b/partition.cpp
index 6c1c3e50b..2195d9d38 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -864,7 +864,7 @@ bool TWPartition::Find_Partition_Size(void) {
char label[32], device[32];
unsigned long size = 0;
- sscanf(line, "%s %lx %*lx %*lu %s", label, &size, device);
+ sscanf(line, "%s %lx %*x %*u %s", label, &size, device);
// Skip header, annotation and blank lines
if ((strncmp(device, "/dev/", 5) != 0) || (strlen(line) < 8))
@@ -1391,13 +1391,13 @@ string TWPartition::Get_Restore_File_System(string restore_folder) {
first_period = Backup_FileName.find(".");
if (first_period == string::npos) {
LOGERR("Unable to find file system (first period).\n");
- return false;
+ return string();
}
Restore_File_System = Backup_FileName.substr(first_period + 1, Backup_FileName.size() - first_period - 1);
second_period = Restore_File_System.find(".");
if (second_period == string::npos) {
LOGERR("Unable to find file system (second period).\n");
- return false;
+ return string();
}
Restore_File_System.resize(second_period);
LOGINFO("Restore file system is: '%s'.\n", Restore_File_System.c_str());