Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 7d0f1a2 | 2016-05-08 16:55:17 -0600 | [diff] [blame] | 2 | /* |
3 | * Copyright (C) 2014 Samsung Electronics | ||||
4 | * Przemyslaw Marczak <p.marczak@samsung.com> | ||||
Simon Glass | 7d0f1a2 | 2016-05-08 16:55:17 -0600 | [diff] [blame] | 5 | */ |
Wolfgang Denk | 74aedc1 | 2010-06-12 00:19:46 +0200 | [diff] [blame] | 6 | #ifndef _ERRNO_H |
Simon Glass | 7d0f1a2 | 2016-05-08 16:55:17 -0600 | [diff] [blame] | 7 | #define _ERRNO_H |
Wolfgang Denk | 74aedc1 | 2010-06-12 00:19:46 +0200 | [diff] [blame] | 8 | |
Masahiro Yamada | 64e4f7f | 2016-09-21 11:28:57 +0900 | [diff] [blame] | 9 | #include <linux/errno.h> |
Wolfgang Denk | 74aedc1 | 2010-06-12 00:19:46 +0200 | [diff] [blame] | 10 | |
11 | extern int errno; | ||||
12 | |||||
13 | #define __set_errno(val) do { errno = val; } while (0) | ||||
14 | |||||
Przemyslaw Marczak | 87e3161 | 2014-10-08 22:48:37 +0200 | [diff] [blame] | 15 | #ifdef CONFIG_ERRNO_STR |
16 | const char *errno_str(int errno); | ||||
Simon Glass | 21adb08 | 2016-05-08 16:55:18 -0600 | [diff] [blame] | 17 | #else |
18 | static inline const char *errno_str(int errno) | ||||
19 | { | ||||
20 | return 0; | ||||
21 | } | ||||
Przemyslaw Marczak | 87e3161 | 2014-10-08 22:48:37 +0200 | [diff] [blame] | 22 | #endif |
Wolfgang Denk | 74aedc1 | 2010-06-12 00:19:46 +0200 | [diff] [blame] | 23 | #endif /* _ERRNO_H */ |