Move list_cloners() from ifconfig(8) to libifconfig(3) where it can be reused by other consumers.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I love to see more ifconfig code move into libifconfig.
sbin/ifconfig/ifclone.c | ||
---|---|---|
66 ↗ | (On Diff #78426) | I don't know if it's worth worrying about the different possible causes of error here. Is the distinction between an error opening the socket and an error in the ioctl actionable by users? It's not as if we do anything different for any of them, other than the actual error message. Developers will almost certainly just truss the thing to figure out which call failed. Alternatively, should we start thinking about a more generic libifconfig function to produce a useful error string? |
sbin/ifconfig/ifclone.c | ||
---|---|---|
66 ↗ | (On Diff #78426) | I agree with both points. My original thought was to just print some "failed to do the thing" type message, but then opted to try preserving the existing error messages as best I could and looked for some libifconfig error description method which I did not find. I'll simplify the error messages here for now and put thinking about a generic method for libifconfig on the TODO list for later. |