aboutsummaryrefslogtreecommitdiff
path: root/lib/errno_str.c
AgeCommit message (Collapse)Author
2023-12-21lib: Remove <common.h> inclusion from these filesTom Rini
After some header file cleanups to add missing include files, remove common.h from all files in the lib directory. This primarily means just dropping the line but in a few cases we need to add in other header files now. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-31lib: errno: sync error codesHeinrich Schuchardt
Macro ERRNO_MSG() ignores the error number but we should still use the same constants as in include/linux/errno.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31lib: errno: check for unsupported error numberHeinrich Schuchardt
If errno_str() is called with an unsupported error number, do not return a random pointer but a reasonable text. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2014-12-11lib: errno: introduce errno_str(): returns errno related messagePrzemyslaw Marczak
The functions error's numbers are standarized - but the error messages are not. The errors are often handled with unclear error messages, so why not use an errno standarized messages. Advantages: - This could decrease the binary size. - Appended with a detailed information, the error message will be clear. This commit introduces new function: - const char *errno_to_str(int errno) The functions returns a pointer to the errno corresponding text message: - if errno is null or positive number - a pointer to "Success" message - if errno is negative - a pointer to errno related message Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Reviewed-by: Tom Rini <trini@ti.com>