1
2
3
4
5
6#ifndef _ERRNO_H
7#define _ERRNO_H
8
9#include <linux/errno.h>
10
11#ifdef __SANDBOX__
12#define __errno_asm_label asm("__u_boot_errno")
13#else
14#define __errno_asm_label
15#endif
16
17extern int errno __errno_asm_label;
18
19#define __set_errno(val) do { errno = val; } while (0)
20
21
22
23
24
25
26
27
28#ifdef CONFIG_ERRNO_STR
29const char *errno_str(int errno);
30#else
31static const char error_message[] = "";
32
33static inline const char *errno_str(int errno)
34{
35 return error_message;
36}
37#endif
38#endif
39