Skip to content
Snippets Groups Projects
Commit 862887d8 authored by Simon Glass's avatar Simon Glass Committed by Tom Warren
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
parent 00e9e6d1
No related branches found
No related tags found
No related merge requests found
...@@ -15,5 +15,10 @@ extern int errno; ...@@ -15,5 +15,10 @@ extern int errno;
#ifdef CONFIG_ERRNO_STR #ifdef CONFIG_ERRNO_STR
const char *errno_str(int errno); const char *errno_str(int errno);
#else
static inline const char *errno_str(int errno)
{
return 0;
}
#endif #endif
#endif /* _ERRNO_H */ #endif /* _ERRNO_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment