summaryrefslogtreecommitdiffstats
path: root/include/errno.h
Commit message (Collapse)AuthorAgeFilesLines
* errno: Allow errno_str() to be used without CONFIG_ERRNO_STRSimon Glass2016-07-051-0/+5
| | | | | | | | | | | | The pmic framework uses errno_str() and this requires board that use it to enable CONFIG_ERRNO_STR to avoid a build error. Update the header to provide a NULL error message when CONFIG_ERRNO_STR is not defined, and fix the build error. This will show as "(null)" when U-Boot prints it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* errno: Add copyright header and header guardSimon Glass2016-07-051-0/+7
| | | | | | | | | Bring in a copyright for this file from cmd/pmic.c since this file was submitted by the same author at around the same time. Also fix the missing header guard. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* lib: errno: introduce errno_str(): returns errno related messagePrzemyslaw Marczak2014-12-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Add basic errno support.Wolfgang Denk2010-09-191-0/+9
Needed for hash table support; probably useful in a lot of other places as well. Signed-off-by: Wolfgang Denk <wd@denx.de>
OpenPOWER on IntegriCloud