-
Notifications
You must be signed in to change notification settings - Fork 284
Cleanup/check ups #2030
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
Cleanup/check ups #2030
Conversation
RincewindsHat
commented
Oct 15, 2024
- clang-format
- copyright update
plugins/check_ups.c
Outdated
| config.check_crit, | ||
| (long)(1000 * config.critical_value), true, 0, | ||
| false, 0)); | ||
| perfdata("voltage", (long)(1000 * ups_utility_voltage), "mV", config.check_warn, (long)(1000 * config.warning_value), config.check_crit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this is better than the current format.
|
@sni: Play around a little bit with the options. What do you think about this one? |
sni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small complaints, but i am willing to drop them for the sake of a consistent format.
plugins/check_ups.c
Outdated
| perfdata("voltage", (long)(1000 * ups_utility_voltage), | ||
| "mV", config.check_warn, | ||
| xasprintf(&data, | ||
| "%s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks better, except these lines with the format on a single line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, i will play a bit more with the binpack parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, changed BinPack. Arguments are again more compressed. Maybe a little bit too much, but to change that the line length should be reduced I guess.
@sni: How do you like it?
plugins/check_ups.c
Outdated
| "will return a WARNING")); | ||
| printf("%s\n", _("state. If the UPS is off or has a low battery the plugin " | ||
| "will return a CRITICAL")); | ||
| printf("%s\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and those...
|
i'd say, so far, this is the best variant. Still not perfect... |