提交 862887d8 编写于 作者: S Simon Glass 提交者: Tom Warren

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: NSimon Glass <sjg@chromium.org>
Signed-off-by: NTom Warren <twarren@nvidia.com>
上级 00e9e6d1
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册