diff options
author | alk3pInjection <webmaster@raspii.tech> | 2023-04-20 00:08:54 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2023-04-20 00:08:54 +0800 |
commit | a7dd355e8fe8ad0c579a4f0acd06b2e3b52dfc3a (patch) | |
tree | 2b552b59793a33466247fc6fb8cf89ecbfdc4a05 /init/devices.cpp | |
parent | f0103ea35d56ccebbae16a43cac19ac38b11a9a2 (diff) | |
parent | 43816573a268998f892081eebf3ffe91d65b7e18 (diff) |
Merge tag 'LA.QSSI.13.0.r1-09800-qssi.0' into tachibanatachibana
"LA.QSSI.13.0.r1-09800-qssi.0"
Change-Id: I06ecf682f4d5595bce3383b6031506cc56bc0db2
Diffstat (limited to 'init/devices.cpp')
-rw-r--r-- | init/devices.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/init/devices.cpp b/init/devices.cpp index d4a3cb9d3..ee8738c2a 100644 --- a/init/devices.cpp +++ b/init/devices.cpp @@ -465,7 +465,11 @@ void DeviceHandler::HandleDevice(const std::string& action, const std::string& d MakeDevice(devpath, block, major, minor, links); } - // We don't have full device-mapper information until a change event is fired. + // Handle device-mapper nodes. + // On kernels <= 5.10, the "add" event is fired on DM_DEV_CREATE, but does not contain name + // information until DM_TABLE_LOAD - thus, we wait for a "change" event. + // On kernels >= 5.15, the "add" event is fired on DM_TABLE_LOAD, followed by a "change" + // event. if (action == "add" || (action == "change" && StartsWith(devpath, "/dev/block/dm-"))) { for (const auto& link : links) { if (!mkdir_recursive(Dirname(link), 0755)) { |