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