Page MenuHomeFreeBSD

rtld: change a few const char* variables to bool
Needs ReviewPublic

Authored by arichardson on Jan 18 2021, 11:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 11 2024, 6:21 PM
Unknown Object (File)
Dec 20 2023, 8:06 AM
Unknown Object (File)
Nov 15 2023, 8:42 PM
Unknown Object (File)
Nov 14 2023, 10:48 AM
Unknown Object (File)
Nov 9 2023, 12:45 PM
Unknown Object (File)
Oct 15 2023, 11:17 PM
Unknown Object (File)
Oct 14 2023, 7:46 PM
Unknown Object (File)
Oct 13 2023, 9:43 AM
Subscribers

Details

Summary

This simplifies their usage. This patch also adds a new helper function to
convert an environment variable to a boolean: all variables that are set,
non-empty, and not equal to "0" are treated as true.

Depends on D28220

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 36313
Build 33202: arc lint + arc unit

Event Timeline

The documentation for these says "When set to a nonempty string", and the GNU world does the same (e.g. see LD_TRACE_LOADED_OBJECTS=1 /bin/echo on a GNU/Linux system), so the strcmp shouldn't be added.

The documentation for these says "When set to a nonempty string", and the GNU world does the same (e.g. see LD_TRACE_LOADED_OBJECTS=1 /bin/echo on a GNU/Linux system), so the strcmp shouldn't be added.

Sure, I can drop that, I just thought that enabling it by passing LD_TRACE_LOADED_OBJECTS=0 /bin/echo is a bit odd.

I'm fine with the cleanup, but agree with Jess that having the value set to non-empty is what should constitute "true".