boot_control: Relax /misc partition name restriction.
Devices are not required to name the partition mounted on /misc
"misc". This patch relaxes this check to verify that the device is a
symlink, without forcing a particular name.
Bug: 25631949
TEST=Applied an update on a device with different partition name for /misc
Change-Id: I538657bce57f72387fdbe1c3b7f464ac98f29e99
diff --git a/boot_control_android.cc b/boot_control_android.cc
index 275d2aa..e4d3c16 100644
--- a/boot_control_android.cc
+++ b/boot_control_android.cc
@@ -134,9 +134,9 @@
base::FilePath misc_device = base::FilePath(record->blk_device);
fs_mgr_free_fstab(fstab);
- if (misc_device.BaseName() != base::FilePath("misc")) {
+ if (!utils::IsSymlink(misc_device.value().c_str())) {
LOG(ERROR) << "Device file " << misc_device.value() << " for /misc "
- << "is not in the expected format.";
+ << "is not a symlink.";
return false;
}