Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6aaa3beb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Removing block device by-num symlinks"

parents 93e45016 95591bd0
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -331,10 +331,6 @@ std::vector<std::string> DeviceHandler::GetBlockDeviceSymlinks(const Uevent& uev
        links.emplace_back(link_path + "/by-name/" + partition_name_sanitized);
    }

    if (uevent.partition_num >= 0) {
        links.emplace_back(link_path + "/by-num/p" + std::to_string(uevent.partition_num));
    }

    auto last_slash = uevent.path.rfind('/');
    links.emplace_back(link_path + "/" + uevent.path.substr(last_slash + 1));

+0 −2
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ TEST(device_handler, get_block_device_symlinks_success_platform_with_partition)
    };
    std::vector<std::string> expected_result{
        "/dev/block/platform/soc.0/f9824900.sdhci/by-name/modem",
        "/dev/block/platform/soc.0/f9824900.sdhci/by-num/p1",
        "/dev/block/platform/soc.0/f9824900.sdhci/mmcblk0p1",
    };

@@ -100,7 +99,6 @@ TEST(device_handler, get_block_device_symlinks_success_platform_with_partition_o
        .partition_num = 1,
    };
    std::vector<std::string> expected_result{
        "/dev/block/platform/soc.0/f9824900.sdhci/by-num/p1",
        "/dev/block/platform/soc.0/f9824900.sdhci/mmcblk0p1",
    };

+0 −1
Original line number Diff line number Diff line
@@ -468,7 +468,6 @@ ListenerAction FirstStageMountVBootV2::UeventCallback(const Uevent& uevent) {
        // the content of uevent. by-name symlink will be at [0] if uevent->partition_name
        // is not empty. e.g.,
        //   - /dev/block/platform/soc.0/f9824900.sdhci/by-name/modem
        //   - /dev/block/platform/soc.0/f9824900.sdhci/by-num/p1
        //   - /dev/block/platform/soc.0/f9824900.sdhci/mmcblk0p1
        std::vector<std::string> links = device_handler_.GetBlockDeviceSymlinks(uevent);
        if (!links.empty()) {