]> git.ipfire.org Git - thirdparty/u-boot.git/blame - include/errno.h
usb: dwc3: add dis_u2_freeclk_exists_quirk
[thirdparty/u-boot.git] / include / errno.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
00e9e6d1
SG
2/*
3 * Copyright (C) 2014 Samsung Electronics
4 * Przemyslaw Marczak <p.marczak@samsung.com>
00e9e6d1 5 */
65cd3fa8 6#ifndef _ERRNO_H
00e9e6d1 7#define _ERRNO_H
65cd3fa8 8
5d97dff0 9#include <linux/errno.h>
65cd3fa8
WD
10
11extern int errno;
12
13#define __set_errno(val) do { errno = val; } while (0)
14
f279e1d9
HS
15/**
16 * errno_str() - get description for error number
17 *
18 * @errno: error number (negative in case of error)
19 * Return: string describing the error. If CONFIG_ERRNO_STR is not
20 * defined an empty string is returned.
21 */
59345b1f
PM
22#ifdef CONFIG_ERRNO_STR
23const char *errno_str(int errno);
862887d8 24#else
f279e1d9
HS
25static const char error_message[] = "";
26
862887d8
SG
27static inline const char *errno_str(int errno)
28{
f279e1d9 29 return error_message;
862887d8 30}
59345b1f 31#endif
65cd3fa8 32#endif /* _ERRNO_H */