blob: 2f03ee89809dd5351b11369874d23fea17744105 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* Copyright (c) 2015-2018, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <odp/api/errno.h>
#include <string.h>
#include <stdio.h>
#include <odp_debug_internal.h>
#include <rte_errno.h>
int odp_errno(void)
{
return rte_errno;
}
void odp_errno_zero(void)
{
rte_errno = 0;
}
void odp_errno_print(const char *str)
{
if (str != NULL)
_ODP_PRINT("%s %s\n", str, strerror(rte_errno));
else
_ODP_PRINT("%s\n", strerror(rte_errno));
}
const char *odp_errno_str(int errnum)
{
return strerror(errnum);
}
|