blob: 15ece2f97f36e067c3b1327722fa4f74ec38e29a [file] [log] [blame]
Simon Glass7d0f1a22016-05-08 16:55:17 -06001/*
2 * Copyright (C) 2014 Samsung Electronics
3 * Przemyslaw Marczak <p.marczak@samsung.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
Wolfgang Denk74aedc12010-06-12 00:19:46 +02007#ifndef _ERRNO_H
Simon Glass7d0f1a22016-05-08 16:55:17 -06008#define _ERRNO_H
Wolfgang Denk74aedc12010-06-12 00:19:46 +02009
10#include <asm-generic/errno.h>
11
12extern int errno;
13
14#define __set_errno(val) do { errno = val; } while (0)
15
Przemyslaw Marczak87e31612014-10-08 22:48:37 +020016#ifdef CONFIG_ERRNO_STR
17const char *errno_str(int errno);
Simon Glass21adb082016-05-08 16:55:18 -060018#else
19static inline const char *errno_str(int errno)
20{
21 return 0;
22}
Przemyslaw Marczak87e31612014-10-08 22:48:37 +020023#endif
Wolfgang Denk74aedc12010-06-12 00:19:46 +020024#endif /* _ERRNO_H */