blob: ccb7869e1708cde503bb0ac6e32584c51e45d40b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass7d0f1a22016-05-08 16:55:17 -06002/*
3 * Copyright (C) 2014 Samsung Electronics
4 * Przemyslaw Marczak <p.marczak@samsung.com>
Simon Glass7d0f1a22016-05-08 16:55:17 -06005 */
Wolfgang Denk74aedc12010-06-12 00:19:46 +02006#ifndef _ERRNO_H
Simon Glass7d0f1a22016-05-08 16:55:17 -06007#define _ERRNO_H
Wolfgang Denk74aedc12010-06-12 00:19:46 +02008
Masahiro Yamada64e4f7f2016-09-21 11:28:57 +09009#include <linux/errno.h>
Wolfgang Denk74aedc12010-06-12 00:19:46 +020010
11extern int errno;
12
13#define __set_errno(val) do { errno = val; } while (0)
14
Przemyslaw Marczak87e31612014-10-08 22:48:37 +020015#ifdef CONFIG_ERRNO_STR
16const char *errno_str(int errno);
Simon Glass21adb082016-05-08 16:55:18 -060017#else
18static inline const char *errno_str(int errno)
19{
20 return 0;
21}
Przemyslaw Marczak87e31612014-10-08 22:48:37 +020022#endif
Wolfgang Denk74aedc12010-06-12 00:19:46 +020023#endif /* _ERRNO_H */