blob: e0c670a16c32c80d0dfe7e95612b70a5cb07ec05 [file] [log] [blame]
Simon Glass00e9e6d2016-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 Denk65cd3fa2010-06-12 00:19:46 +02007#ifndef _ERRNO_H
Simon Glass00e9e6d2016-05-08 16:55:17 -06008#define _ERRNO_H
Wolfgang Denk65cd3fa2010-06-12 00:19:46 +02009
Masahiro Yamada5d97dff2016-09-21 11:28:57 +090010#include <linux/errno.h>
Wolfgang Denk65cd3fa2010-06-12 00:19:46 +020011
12extern int errno;
13
14#define __set_errno(val) do { errno = val; } while (0)
15
Przemyslaw Marczak59345b12014-10-08 22:48:37 +020016#ifdef CONFIG_ERRNO_STR
17const char *errno_str(int errno);
Simon Glass862887d2016-05-08 16:55:18 -060018#else
19static inline const char *errno_str(int errno)
20{
21 return 0;
22}
Przemyslaw Marczak59345b12014-10-08 22:48:37 +020023#endif
Wolfgang Denk65cd3fa2010-06-12 00:19:46 +020024#endif /* _ERRNO_H */