HomeFreeBSD

kldxref: Fix maketempfile function's way of finding the root dir

Description

kldxref: Fix maketempfile function's way of finding the root dir

Rather than assuming that the "root" is passed as directory and will be
marked by a trailing slash, we just assume that the directory, which has
been checked previously to be a directory, is a directory.

This fixes an inconsistency between kldxref /boot/modules, which tries
to create the temp file in /boot/, and kldxref /boot/modules/, which
tries to create it in /boot/modules/ itself.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1093

Details

Provenance
freebsd_igalic.coAuthored on Feb 2 2024, 3:35 PM
impCommitted on Feb 2 2024, 3:35 PM
Parents
rG36f0a34ca645: libthr: Force the thr_wake() symbol to be resolved during initialization
Branches
Unknown
Tags
Unknown