Date: Sat, 9 Sep 2017 18:00:40 +0000 From: "Kamil Rytarowski" <ka...@netbsd.org> Message-ID: <20170909180040.222c2f...@cvs.netbsd.org>
| Not that devname(3) does not set errno on failure and document it as a bug. Not everything in libc is expected to set errno on failure - in fact most functions don't (though they may alter it) and shouldn't. errno is (mostly) intended for sys calls - the values defined for it are chosen with that (mostly) in mind - there are a few other functions that have no other reasonable way to indicate errors, and so also use errno, but those are decidedly in the minority. devname() is in neither set, having it return errors through errno would be a mistake. kre