wkz / mdio-tools

Low-level debug tools for MDIO devices.
GNU General Public License v2.0
66 stars 29 forks source link

RFC: Leverage errno everywhere, like libmnl, and use err() and warn() helper functions #2

Closed troglobit closed 3 years ago

troglobit commented 3 years ago

This is a proposal to leverage errno more and propagate errors back to the user with the classic err() and warn() family of BSD functions. They format error/warn messages as: "progname: your formatted string: %s", your args, strerror(errno), thus providing a consistent error or warning style to the program.

Note: this patch overlaps overlaps with the previous segfault patch submitted earlier.

troglobit commented 3 years ago

Superseded by PR #4.