git: boot/common: Use full root paths for MODINFO_NAME
Aaron LI
aly at crater.dragonflybsd.org
Tue Feb 21 06:17:25 PST 2023
commit 34f6038d8e05d03acda52bf11979c6c2afe7b5ea
Author: Aaron LI <aly at aaronly.me>
Date: Tue Feb 21 13:26:56 2023 +0800
boot/common: Use full root paths for MODINFO_NAME
Previously, only the basename of kernel/modules was stored in the
MODINFO_NAME field (i.e., 'f_name' field of 'struct preloaded_file').
So kldstat(2) was unable to obtain the full paths of the kernel and
preloaded modules.
This commit makes the full paths be stored in the MODINFO_NAME field.
After bootstrap, the boot partition is mounted at '/boot', so these
full paths must start with '/boot' (e.g., '/boot/kernel/kernel') for
kernel use.
Summary of changes:
stand/boot/common/bootstrap.h | 7 +++++--
stand/boot/common/load_elf.c | 25 ++++++++-----------------
stand/boot/common/load_elf_obj.c | 4 ++--
stand/boot/common/module.c | 12 ++++++++++--
stand/boot/common/rel_open.c | 27 +++++++++++++++++++++++++++
5 files changed, 52 insertions(+), 23 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/34f6038d8e05d03acda52bf11979c6c2afe7b5ea
--
DragonFly BSD source repository
More information about the Commits
mailing list