Loading init/firmware_handler.cpp +17 −3 Original line number Diff line number Diff line Loading @@ -80,16 +80,27 @@ void FirmwareHandler::ProcessFirmwareEvent(const Uevent& uevent) { return; } std::vector<std::string> attempted_paths_and_errors; try_loading_again: attempted_paths_and_errors.clear(); for (const auto& firmware_directory : firmware_directories_) { std::string file = firmware_directory + uevent.firmware; unique_fd fw_fd(open(file.c_str(), O_RDONLY | O_CLOEXEC)); if (fw_fd == -1) { attempted_paths_and_errors.emplace_back("firmware: attempted " + file + ", open failed: " + strerror(errno)); continue; } struct stat sb; if (fw_fd != -1 && fstat(fw_fd, &sb) != -1) { if (fstat(fw_fd, &sb) == -1) { attempted_paths_and_errors.emplace_back("firmware: attempted " + file + ", fstat failed: " + strerror(errno)); continue; } LoadFirmware(uevent, root, fw_fd, sb.st_size, loading_fd, data_fd); return; } } if (booting) { // If we're not fully booted, we may be missing Loading @@ -100,6 +111,9 @@ try_loading_again: } LOG(ERROR) << "firmware: could not find firmware for " << uevent.firmware; for (const auto& message : attempted_paths_and_errors) { LOG(ERROR) << message; } // Write "-1" as our response to the kernel's firmware request, since we have nothing for it. write(loading_fd, "-1", 2); Loading Loading
init/firmware_handler.cpp +17 −3 Original line number Diff line number Diff line Loading @@ -80,16 +80,27 @@ void FirmwareHandler::ProcessFirmwareEvent(const Uevent& uevent) { return; } std::vector<std::string> attempted_paths_and_errors; try_loading_again: attempted_paths_and_errors.clear(); for (const auto& firmware_directory : firmware_directories_) { std::string file = firmware_directory + uevent.firmware; unique_fd fw_fd(open(file.c_str(), O_RDONLY | O_CLOEXEC)); if (fw_fd == -1) { attempted_paths_and_errors.emplace_back("firmware: attempted " + file + ", open failed: " + strerror(errno)); continue; } struct stat sb; if (fw_fd != -1 && fstat(fw_fd, &sb) != -1) { if (fstat(fw_fd, &sb) == -1) { attempted_paths_and_errors.emplace_back("firmware: attempted " + file + ", fstat failed: " + strerror(errno)); continue; } LoadFirmware(uevent, root, fw_fd, sb.st_size, loading_fd, data_fd); return; } } if (booting) { // If we're not fully booted, we may be missing Loading @@ -100,6 +111,9 @@ try_loading_again: } LOG(ERROR) << "firmware: could not find firmware for " << uevent.firmware; for (const auto& message : attempted_paths_and_errors) { LOG(ERROR) << message; } // Write "-1" as our response to the kernel's firmware request, since we have nothing for it. write(loading_fd, "-1", 2); Loading