Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7d400f9d authored by Will McVicker's avatar Will McVicker
Browse files

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
parent a8a6d67f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment