1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2014 Samsung Electronics
4 * Przemyslaw Marczak <p.marczak@samsung.com>
9 #include <linux/errno.h>
12 #define __errno_asm_label asm("__u_boot_errno")
14 #define __errno_asm_label
17 extern int errno __errno_asm_label;
19 #define __set_errno(val) do { errno = val; } while (0)
22 * errno_str() - get description for error number
24 * @errno: error number (negative in case of error)
25 * Return: string describing the error. If CONFIG_ERRNO_STR is not
26 * defined an empty string is returned.
28 #ifdef CONFIG_ERRNO_STR
29 const char *errno_str(int errno);
31 static const char error_message[] = "";
33 static inline const char *errno_str(int errno)