platform_system_core/toolbox
Will McVicker 7d400f9d8c toolbox/modprobe: Use libmodprobe to load modules from FILE
When a file is provided (via --all=FILE), let's use libmodprobe to load
the modules. This let's us use the logic in libmodprobe to parse the
provided modules load file -- FILE. The functional differences include:

 - Removes the FILE parsing logic in modprobe.
 - Returns early if FILE doesn't exist.
 - Adds Dirname(FILE) to mod_dirs which means libmodprobe will parse the
   modules.* files inside Dirname(FILE). Previously, modprobe would only
   parse the modules.* files in the mod_dirs passed in by `-d DIR`. If
   no directories were provided, we would fallback to the default
   /lib/modules path. This patch removes the mod_dirs.empty() fallback
   path when --all=FILE is used. It's unlikely anyone uses `--all=FILE`
   without `-d DIR` unless FILE is inside the fallback path --
   /lib/modules.

Test: verified lsmod on pixel 6
Bug: 324018983
Change-Id: I8d241832f2a1f18d14207e3e3777e015c1ddb25f
2024-03-15 14:58:31 -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 toolbox/generate-input.h-labels.py: python3. 2021-08-17 14:34:55 -07:00
getevent.c Remove stray newline from err() call. 2023-09-07 19:30:31 +00:00
getprop.cpp newfs_msdos: switch to external/newfs_msdos. 2018-06-13 13:21:24 -07:00
modprobe.cpp toolbox/modprobe: Use libmodprobe to load modules from FILE 2024-03-15 14:58:31 -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 Update owners for modprobe.c 2021-04-01 12:42:21 -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