blob: 15ece2f97f36e067c3b1327722fa4f74ec38e29a [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
10#include <asm-generic/errno.h>
11
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 */