Blame view
include/errno.h
700 Bytes
83d290c56
|
1 |
/* SPDX-License-Identifier: GPL-2.0+ */ |
00e9e6d1f
|
2 3 4 |
/* * Copyright (C) 2014 Samsung Electronics * Przemyslaw Marczak <p.marczak@samsung.com> |
00e9e6d1f
|
5 |
*/ |
65cd3fa81
|
6 |
#ifndef _ERRNO_H |
00e9e6d1f
|
7 |
#define _ERRNO_H |
65cd3fa81
|
8 |
|
5d97dff04
|
9 |
#include <linux/errno.h> |
65cd3fa81
|
10 11 12 13 |
extern int errno; #define __set_errno(val) do { errno = val; } while (0) |
f279e1d91
|
14 15 16 17 18 19 20 |
/** * errno_str() - get description for error number * * @errno: error number (negative in case of error) * Return: string describing the error. If CONFIG_ERRNO_STR is not * defined an empty string is returned. */ |
59345b1f0
|
21 22 |
#ifdef CONFIG_ERRNO_STR const char *errno_str(int errno); |
862887d88
|
23 |
#else |
f279e1d91
|
24 |
static const char error_message[] = ""; |
862887d88
|
25 26 |
static inline const char *errno_str(int errno) { |
f279e1d91
|
27 |
return error_message; |
862887d88
|
28 |
} |
59345b1f0
|
29 |
#endif |
65cd3fa81
|
30 |
#endif /* _ERRNO_H */ |