Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 34ffa7e

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "init: error log on by-name identical replacement"
2 parents a07d295 + 3c426b6 commit 34ffa7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init/first_stage_mount.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ ListenerAction FirstStageMountVBootV2::UeventCallback(const Uevent& uevent) {
560560
std::vector<std::string> links = device_handler_->GetBlockDeviceSymlinks(uevent);
561561
if (!links.empty()) {
562562
auto [it, inserted] = by_name_symlink_map_.emplace(uevent.partition_name, links[0]);
563-
if (!inserted) {
563+
if (!inserted && (links[0] != it->second)) {
564564
LOG(ERROR) << "Partition '" << uevent.partition_name
565565
<< "' already existed in the by-name symlink map with a value of '"
566566
<< it->second << "', new value '" << links[0] << "' will be ignored.";

0 commit comments

Comments
 (0)