platform_system_core/toolbox
Will McVicker 87b2ef0edf libmodprobe: refactor blocklist functionality
Remove the function EnableBlocklist() and add a constructor argument to
enable/disable the use of modules.blocklist. In all cases, the
enabling/disabling of the blocklist happens immediately after creating
the Modprobe object. So this simplies libmodprobe.

Additionally, the use of the blocklist by libmodprobe should be enabled
by default unless explicitly disabled during creation of the Modprobe
object. Currently, only modprobe(8) defaults to not using the blocklist
and includes the argument -b BLOCKLIST for enabling it. That
functionality remains.

This refactor allows us to use the blocklist during first stage init.
However, additional logic is needed to not return an error for the
blocked non-aliased modules during first stage init; otherwise, the
error would result in an init crash leading to a device reboot. So fixup
LoadListedModules() to allow blocking modules without returning an
error.

Bug: 182582036
Test: boot test on pixel 5 with a module in modules.blocklist
Change-Id: I394b5aa98fa98821011982cfe693749010c381f7
2021-03-31 09:34:47 -07:00
..
Android.bp [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
generate-input.h-labels.py Fix the generated getevent labels. 2016-06-29 14:12:29 -07:00
getevent.c toolbox: getevent: disable stdout buffering 2019-01-15 16:42:59 +01:00
getprop.cpp newfs_msdos: switch to external/newfs_msdos. 2018-06-13 13:21:24 -07:00
modprobe.cpp libmodprobe: refactor blocklist functionality 2021-03-31 09:34:47 -07:00
MODULE_LICENSE_APACHE2 newfs_msdos: switch to external/newfs_msdos. 2018-06-13 13:21:24 -07:00
NOTICE newfs_msdos: switch to external/newfs_msdos. 2018-06-13 13:21:24 -07:00
OWNERS toolbox: make all janitors the owners. 2020-06-26 15:46:48 -07:00
setprop.cpp toolbox: add setprop, start, and stop 2019-06-06 11:20:29 -07:00
start.cpp iorap: Remove toggling iorapd on/off when using 'start' command. 2020-11-16 18:45:47 +00:00
toolbox.c Fix toolbox failure return to match similar tools. 2016-04-12 08:40:43 -07:00
tools.h toolbox: add modprobe 2019-08-06 13:58:13 -07:00