Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: boolean settings not treated as booleans #2421

Open
jimklimov opened this issue Apr 27, 2024 · 0 comments
Open

Refactor: boolean settings not treated as booleans #2421

jimklimov opened this issue Apr 27, 2024 · 0 comments
Labels
impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) portability We want NUT to build and run everywhere possible Qx protocol driver Driver based on Megatec Q<number> such as new nutdrv_qx, or obsoleted blazer and some others refactor/fightwarn PR or issue proposal to improve code maintainability without functional changes, or to fix warnings
Milestone

Comments

@jimklimov
Copy link
Member

jimklimov commented Apr 27, 2024

Some drivers (e.g. nutdrv_qx core or certain subdrivers) have options with values enabled/disabled that are magically parsed (with strchr('d') or similar) instead of just being booleans (with several standard string tokens per meaning) supported by NUT for a long time.

Revise the code for such cases and convert to common booleans where applicable. Perhaps add understanding of enabled/disabled as true/false to the common parsers, for backwards compatibility of existing configs.

Discovered during work on #2294.

@jimklimov jimklimov added refactor/fightwarn PR or issue proposal to improve code maintainability without functional changes, or to fix warnings Qx protocol driver Driver based on Megatec Q<number> such as new nutdrv_qx, or obsoleted blazer and some others portability We want NUT to build and run everywhere possible impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) labels Apr 27, 2024
@jimklimov jimklimov added this to the 2.8.4 milestone Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) portability We want NUT to build and run everywhere possible Qx protocol driver Driver based on Megatec Q<number> such as new nutdrv_qx, or obsoleted blazer and some others refactor/fightwarn PR or issue proposal to improve code maintainability without functional changes, or to fix warnings
Projects
None yet
Development

No branches or pull requests

1 participant