]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/errno-list.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
6 #include "errno-list.h"
9 static const struct errno_name
* lookup_errno(register const char *str
,
10 register GPERF_LEN_TYPE len
);
12 #include "errno-from-name.h"
13 #include "errno-to-name.h"
15 const char *errno_to_name(int id
) {
20 if (id
>= (int) ELEMENTSOF(errno_names
))
23 return errno_names
[id
];
26 int errno_from_name(const char *name
) {
27 const struct errno_name
*sc
;
31 sc
= lookup_errno(name
, strlen(name
));