1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 Copyright 2013 Lennart Poettering
10 * MAX_ERRNO is defined as 4095 in linux/err.h
11 * We use the same value here.
13 #define ERRNO_MAX 4095
15 const char *errno_to_name(int id);
16 int errno_from_name(const char *name);
17 static inline bool errno_is_valid(int n) {
18 return n > 0 && n <= ERRNO_MAX;