Project

General

Profile

Actions

Bug #14138

closed

cxgbetool does not need to reinvent err()

Added by Yuri Pankov 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

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.

Actions #1

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 1741
Actions #2

Updated by Yuri Pankov 2 months ago

  • Description updated (diff)
  • Status changed from New to Pending RTI
  • Assignee set to Yuri Pankov
  • % Done changed from 0 to 90
  • Difficulty changed from Medium to Bite-size
Actions #3

Updated by Electric Monk about 2 months ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit 65ecf39910b97501cd4a7cddd37a5177aba96025

commit  65ecf39910b97501cd4a7cddd37a5177aba96025
Author: Yuri Pankov <ypankov@tintri.com>
Date:   2021-10-08T14:11:37.000Z

    14137 cxgbetool cudbg dumps core if called without options
    14138 cxgbetool does not need to reinvent err()
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF