blob: e0c670a16c32c80d0dfe7e95612b70a5cb07ec05 [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
Masahiro Yamada64e4f7f2016-09-21 11:28:57 +090010#include <linux/errno.h>
Wolfgang Denk74aedc12010-06-12 00:19:46 +020011
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 */