Savagedlight / libifconfig

A C API to do most things done by the FreeBSD 'ifconfig' program today
Other
26 stars 7 forks source link

struct errstate: Remove ioctl_err #5

Closed Savagedlight closed 8 years ago

Savagedlight commented 8 years ago

The ioctl() command always returns 0 or -1 (success and failure respectively), and the actual error is stored in the thread-safe global errno variable. Remove ioctl_err and have applications use the global 'errno' variable to do their further checking.

Savagedlight commented 8 years ago

Should actually rename ioctl_err to errno and store the value of the global variable 'errno' here. This will allow applications to get all the error information, even if their error reporting/parsing runs on a different thread than the one that made the library call.