[Nut-upsdev] Patching CyberPower UPS drivers
ben at benkamen.net
Thu Jan 28 17:03:22 UTC 2016
On 2016-01-28 8:18 AM, Charles Lepple wrote:
> I definitely like your approach. Thanks for moving some of the "magic numbers" to named constants, as well.
Thanks. Always nice to have real coders sanity check anything I've written with a "thumbs up" response. (I'm more a hardware guy)
And sscanf was working like poo -- so I figured I'd parse it differently with something that didn't seem so sensitive.
> A few items:
> * Since v2.6.5, some of the string functions were renamed. rtrim() -> str_rtrim(), for instance.
I'll take a look at the latest.... as mentioned, 2.6.5 is what's on my CentOS system with nothing later (yet) so I just downloaded the SRPMS to work on.
but I also have 2.7.3 downloaded -- so I'll see what I can do with that.
> * If you are taking out a block of code, "#if 0" is better than comment characters (which don't nest), and removing it completely is even better (fewer false positives when searching). If nothing else, it's in version control.
Yea - the comments were just temporary to keep the old stuff in my view while I was re-writing around it.
Then once it worked and I planned on removing it.
I'll send along something more finished once I'm done.
More information about the Nut-upsdev