HomeFreeBSD

getlocalbase: Make default path actually configurable

Description

getlocalbase: Make default path actually configurable

We include paths.h in getlocalbase.c, which defines _PATH_LOCALBASE.
This will override a definition on the command line, meaning it is
impossible to override like how the manpage says you can, and it means
the code to provide a fallback default is dead as the macro is always
defined.

Instead, introduce a new LOCALBASE_PATH macro like LOCALBASE_CTL_LEN
that can be set on the command line and will default to the system's
existing _PATH_LOCALBASE to avoid duplicating the default here.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40975

Details

Provenance
jrtc27Authored on Jul 11 2023, 8:49 PM
Reviewer
imp
Differential Revision
D40975: getlocalbase: Make default path actually configurable
Parents
rGd1e44bc94494: kmod.mk: Use portable printf '%s' over non-portable echo -n
Branches
Unknown
Tags
Unknown