1 /* SPDX-License-Identifier: LGPL-2.1+ */
3 This file is part of systemd.
5 Copyright 2013 Lennart Poettering
11 #include "errno-list.h"
14 static const struct errno_name* lookup_errno(register const char *str,
15 register GPERF_LEN_TYPE len);
17 #include "errno-from-name.h"
18 #include "errno-to-name.h"
20 const char *errno_to_name(int id) {
25 if (id >= (int) ELEMENTSOF(errno_names))
28 return errno_names[id];
31 int errno_from_name(const char *name) {
32 const struct errno_name *sc;
36 sc = lookup_errno(name, strlen(name));
43 #if 0 /// UNNEEDED by elogind