Skip to content

Commit

Permalink
update_engine: Fallback to partition without suffix
Browse files Browse the repository at this point in the history
Change-Id: I663f8a2ae64709155cb24f289a81fcbbda0521df
  • Loading branch information
luca020400 committed Jan 6, 2019
1 parent fce3e0c commit 27ddc72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion boot_control_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ bool BootControlAndroid::GetPartitionDevice(const string& partition_name,
base::FilePath path = misc_device.DirName().Append(partition_name + suffix);
if (!base::PathExists(path)) {
LOG(ERROR) << "Device file " << path.value() << " does not exist.";
return false;
// Try without slot suffix
path = misc_device.DirName().Append(partition_name);
if (!base::PathExists(path)) {
LOG(ERROR) << "Device file " << path.value() << " does not exist.";
return false;
}
}

*device = path.value();
Expand Down

0 comments on commit 27ddc72

Please sign in to comment.