Merge "Use android::base::Basename instead of basename" am: d5fc9eae52 am: 5f835ec909 am: ebe0cffe00

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2536808

Change-Id: I7b50a4aa4e9aa828667f9411a1db1022f12046fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Colin Cross 2023-04-14 19:06:05 +00:00 committed by Automerger Merge Worker
commit 8a4f63d2ea

View file

@ -562,7 +562,7 @@ std::vector<std::string> Modprobe::ListModules(const std::string& pattern) {
// Attempt to match both the canonical module name and the module filename.
if (!fnmatch(pattern.c_str(), module.c_str(), 0)) {
rv.emplace_back(module);
} else if (!fnmatch(pattern.c_str(), basename(deps[0].c_str()), 0)) {
} else if (!fnmatch(pattern.c_str(), android::base::Basename(deps[0]).c_str(), 0)) {
rv.emplace_back(deps[0]);
}
}