Hello, Well, ok, errno is supposed to be zero, but in the rare cases where it's not, what is intended? Assuming ESOMETHING is always positive, in userspace errno is positive, e.g. you test for errno == EBADF. In barebox however most assignments use errno = -ESOMETHING but there are also some tests and assignments without minus. barebox' perror expects a negative errno which is also different from POSIX' perror. strerror uses positive semantics in both barebox and POSIX. I'd vote to fix barebox to use the same semantic for errno (and perror) as POSIX. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox