mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-22 20:24:27 +01:00
errno: Allow errno_str() to be used without CONFIG_ERRNO_STR
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>
This commit is contained in:
parent
00e9e6d1ff
commit
862887d883
1 changed files with 5 additions and 0 deletions
|
|
@ -15,5 +15,10 @@ extern int errno;
|
|||
|
||||
#ifdef CONFIG_ERRNO_STR
|
||||
const char *errno_str(int errno);
|
||||
#else
|
||||
static inline const char *errno_str(int errno)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* _ERRNO_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue