Page MenuHomeFreeBSD

getlocalbase: Make default path actually configurable
ClosedPublic

Authored by jrtc27 on Jul 11 2023, 6:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 5, 8:28 AM
Unknown Object (File)
Mon, Jul 27, 3:15 PM
Unknown Object (File)
Sat, Jul 25, 11:26 PM
Unknown Object (File)
Wed, Jul 22, 6:35 PM
Unknown Object (File)
Wed, Jul 22, 9:03 AM
Unknown Object (File)
Wed, Jul 22, 5:22 AM
Unknown Object (File)
Wed, Jul 15, 6:33 AM
Unknown Object (File)
Tue, Jul 14, 10:41 AM
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