mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
basic/errno-list: remove errno_max() and define ERRNO_MAX as 4095
In Linux kernel code, MAX_ERRNO is defined as 4095. Here, we use that value for ERRNO_MAX.
This commit is contained in:
parent
f332611abe
commit
1850d0d271
@ -51,7 +51,3 @@ int errno_from_name(const char *name) {
|
||||
assert(sc->id > 0);
|
||||
return sc->id;
|
||||
}
|
||||
|
||||
int errno_max(void) {
|
||||
return ELEMENTSOF(errno_names);
|
||||
}
|
||||
|
@ -19,7 +19,11 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
/*
|
||||
* MAX_ERRNO is defined as 4095 in linux/err.h
|
||||
* We use the same value here.
|
||||
*/
|
||||
#define ERRNO_MAX 4095
|
||||
|
||||
const char *errno_to_name(int id);
|
||||
int errno_from_name(const char *name);
|
||||
|
||||
int errno_max(void);
|
||||
|
Loading…
Reference in New Issue
Block a user