From 2833e5d37d838b6e8c7444d79cf96a413f930277 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Mon, 21 Sep 2020 10:56:10 +0900 Subject: [PATCH] ueventd: change firmware location in apexes To be consistent with other prebuilt modules within APEXes, the location for firmware files is switched from /apex/*/firmware to /apex/*/etc/firmware. Bug: 167942098 Test: loading vibrator firmware from vibrator apex(sunfish) Change-Id: Ia05735bf5a54482fded26525fa4a8f795dcfc029 --- init/README.ueventd.md | 2 +- init/firmware_handler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init/README.ueventd.md b/init/README.ueventd.md index 0f584b2c3..4363f3c89 100644 --- a/init/README.ueventd.md +++ b/init/README.ueventd.md @@ -86,7 +86,7 @@ Ueventd by default serves firmware requests by searching through a list of firmw for a file matching the uevent `FIRMWARE`. It then forks a process to serve this firmware to the kernel. -`/apex/*/firmware` is also searched after a list of firmware directories. +`/apex/*/etc/firmware` is also searched after a list of firmware directories. The list of firmware directories is customized by a `firmware_directories` line in a ueventd.rc file. This line takes the format of diff --git a/init/firmware_handler.cpp b/init/firmware_handler.cpp index b50b4efa1..ba7e6bd63 100644 --- a/init/firmware_handler.cpp +++ b/init/firmware_handler.cpp @@ -256,7 +256,7 @@ bool FirmwareHandler::ForEachFirmwareDirectory( } glob_t glob_result; - glob("/apex/*/firmware/", GLOB_MARK, nullptr, &glob_result); + glob("/apex/*/etc/firmware/", GLOB_MARK, nullptr, &glob_result); auto free_glob = android::base::make_scope_guard(std::bind(&globfree, &glob_result)); for (size_t i = 0; i < glob_result.gl_pathc; i++) { char* apex_firmware_directory = glob_result.gl_pathv[i];