mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 22:03:15 +00:00
862887d883
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>
24 lines
432 B
C
24 lines
432 B
C
/*
|
|
* Copyright (C) 2014 Samsung Electronics
|
|
* Przemyslaw Marczak <p.marczak@samsung.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
#ifndef _ERRNO_H
|
|
#define _ERRNO_H
|
|
|
|
#include <asm-generic/errno.h>
|
|
|
|
extern int errno;
|
|
|
|
#define __set_errno(val) do { errno = val; } while (0)
|
|
|
|
#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 */
|