cxgbetool does not need to reinvent err()
cxgbetool reinvents err(3C), which while non-standard is available on illumos, FreeBSD, and Linux; more so some of the places should have used errx() instead, e.g.:
$ cxgbetool /dev/t4nex0 loadfw error: incorrect number of arguments.: Error 0
To test this, I invoked
cxgbetool as shown above and got error message without the erroneous
: Error 0; also the error message for
cxgbetool /dev/t4nex0 cudbg does not have that suffix. I have not tested all of the output as it's pretty hard to get it the out of memory conditions, but otherwise it's either unchanged or improved.