As a preparation for upcoming commit, extract part which is responsible
for external program execution to libmodprobe so it can be later
re-used not only for firmware handler but also for dynamic module
options handler within libmodprobe.
RunExternalHandler is moved entirely to separate library with two
changes:
- Setting env needed previously by firmware handler was made generic and
now external handler can get envs_map containing pairs of env and its
value which needs to be set.
- "Firmware" was removed from one of the log since now it can be used in
different context (s/External Firmware Handler/External Handler/)
Bug: 335619610
Test: `atest CtsInitTestCases` passed, especially:
[105/129] ueventd_parser#ExternalFirmwareHandlers: PASSED (0ms)
[106/129] ueventd_parser#ExternalFirmwareHandlersDuplicate: PASSED (0ms)
Change-Id: Ie07cee763278f224bd3c0acfbe06c44eb36d0a81
40 lines
820 B
Text
40 lines
820 B
Text
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libmodprobe",
|
|
cflags: [
|
|
"-Werror",
|
|
],
|
|
vendor_available: true,
|
|
ramdisk_available: true,
|
|
recovery_available: true,
|
|
vendor_ramdisk_available: true,
|
|
host_supported: true,
|
|
srcs: [
|
|
"exthandler.cpp",
|
|
"libmodprobe.cpp",
|
|
"libmodprobe_ext.cpp",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
],
|
|
export_include_dirs: ["include/"],
|
|
}
|
|
|
|
cc_test {
|
|
name: "libmodprobe_tests",
|
|
cflags: ["-Werror"],
|
|
shared_libs: [
|
|
"libbase",
|
|
],
|
|
local_include_dirs: ["include/"],
|
|
srcs: [
|
|
"exthandler.cpp",
|
|
"libmodprobe_test.cpp",
|
|
"libmodprobe.cpp",
|
|
"libmodprobe_ext_test.cpp",
|
|
],
|
|
test_suites: ["device-tests"],
|
|
}
|