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)
Sun, Sep 13, 7:35 AM
Unknown Object (File)
Sun, Sep 6, 4:09 PM
Unknown Object (File)
Sun, Sep 6, 2:52 AM
Unknown Object (File)
Sun, Sep 6, 1:39 AM
Unknown Object (File)
Sun, Sep 6, 1:12 AM
Unknown Object (File)
Fri, Sep 4, 12:36 AM
Unknown Object (File)
Thu, Sep 3, 5:52 PM
Unknown Object (File)
Thu, Sep 3, 6:37 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 Passed
Unit
No Test Coverage
Build Status
Buildable 52563
Build 49454: arc lint + arc unit