Page MenuHomeFreeBSD

getlocalbase: Make default path actually configurable
ClosedPublic

Authored by jrtc27 on Jul 11 2023, 6:15 PM.
Tags
None
Referenced Files
F155006544: D40975.diff
Thu, Apr 30, 3:35 PM
Unknown Object (File)
Mon, Apr 27, 12:26 PM
Unknown Object (File)
Sun, Apr 19, 6:27 PM
Unknown Object (File)
Sun, Apr 19, 10:51 AM
Unknown Object (File)
Sun, Apr 19, 3:36 AM
Unknown Object (File)
Thu, Apr 16, 9:13 PM
Unknown Object (File)
Tue, Apr 7, 4:18 AM
Unknown Object (File)
Mon, Apr 6, 10:03 PM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable