mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:07:36 +00:00
Kernel+LibC: Move errno definitions to Kernel/API/POSIX
This fixes at least half of our LibC includes in the kernel. The source of truth for errno codes and their description strings now lives in Kernel/API/POSIX/errno.h as an enumeration, which LibC includes.
This commit is contained in:
parent
0cca6cef95
commit
69ef211925
23 changed files with 123 additions and 183 deletions
94
Userland/Libraries/LibC/errno_codes.h
Normal file
94
Userland/Libraries/LibC/errno_codes.h
Normal file
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/errno.h>
|
||||
|
||||
// NOTE: You can't define with a macro, so these have to be duplicated.
|
||||
#define EPERM EPERM
|
||||
#define ENOENT ENOENT
|
||||
#define ESRCH ESRCH
|
||||
#define EINTR EINTR
|
||||
#define EIO EIO
|
||||
#define ENXIO ENXIO
|
||||
#define E2BIG E2BIG
|
||||
#define ENOEXEC ENOEXEC
|
||||
#define EBADF EBADF
|
||||
#define ECHILD ECHILD
|
||||
#define EAGAIN EAGAIN
|
||||
#define ENOMEM ENOMEM
|
||||
#define EACCES EACCES
|
||||
#define EFAULT EFAULT
|
||||
#define ENOTBLK ENOTBLK
|
||||
#define EBUSY EBUSY
|
||||
#define EEXIST EEXIST
|
||||
#define EXDEV EXDEV
|
||||
#define ENODEV ENODEV
|
||||
#define ENOTDIR ENOTDIR
|
||||
#define EISDIR EISDIR
|
||||
#define EINVAL EINVAL
|
||||
#define ENFILE ENFILE
|
||||
#define EMFILE EMFILE
|
||||
#define ENOTTY ENOTTY
|
||||
#define ETXTBSY ETXTBSY
|
||||
#define EFBIG EFBIG
|
||||
#define ENOSPC ENOSPC
|
||||
#define ESPIPE ESPIPE
|
||||
#define EROFS EROFS
|
||||
#define EMLINK EMLINK
|
||||
#define EPIPE EPIPE
|
||||
#define ERANGE ERANGE
|
||||
#define ENAMETOOLONG ENAMETOOLONG
|
||||
#define ELOOP ELOOP
|
||||
#define EOVERFLOW EOVERFLOW
|
||||
#define EOPNOTSUPP EOPNOTSUPP
|
||||
#define ENOSYS ENOSYS
|
||||
#define ENOTIMPL ENOTIMPL
|
||||
#define EAFNOSUPPORT EAFNOSUPPORT
|
||||
#define ENOTSOCK ENOTSOCK
|
||||
#define EADDRINUSE EADDRINUSE
|
||||
#define EWHYTHO EWHYTHO
|
||||
#define ENOTEMPTY ENOTEMPTY
|
||||
#define EDOM EDOM
|
||||
#define ECONNREFUSED ECONNREFUSED
|
||||
#define EHOSTDOWN EHOSTDOWN
|
||||
#define EADDRNOTAVAIL EADDRNOTAVAIL
|
||||
#define EISCONN EISCONN
|
||||
#define ECONNABORTED ECONNABORTED
|
||||
#define EALREADY EALREADY
|
||||
#define ECONNRESET ECONNRESET
|
||||
#define EDESTADDRREQ EDESTADDRREQ
|
||||
#define EHOSTUNREACH EHOSTUNREACH
|
||||
#define EILSEQ EILSEQ
|
||||
#define EMSGSIZE EMSGSIZE
|
||||
#define ENETDOWN ENETDOWN
|
||||
#define ENETUNREACH ENETUNREACH
|
||||
#define ENETRESET ENETRESET
|
||||
#define ENOBUFS ENOBUFS
|
||||
#define ENOLCK ENOLCK
|
||||
#define ENOMSG ENOMSG
|
||||
#define ENOPROTOOPT ENOPROTOOPT
|
||||
#define ENOTCONN ENOTCONN
|
||||
#define ESHUTDOWN ESHUTDOWN
|
||||
#define ETOOMANYREFS ETOOMANYREFS
|
||||
#define EPROTONOSUPPORT EPROTONOSUPPORT
|
||||
#define ESOCKTNOSUPPORT ESOCKTNOSUPPORT
|
||||
#define EDEADLK EDEADLK
|
||||
#define ETIMEDOUT ETIMEDOUT
|
||||
#define EPROTOTYPE EPROTOTYPE
|
||||
#define EINPROGRESS EINPROGRESS
|
||||
#define ENOTHREAD ENOTHREAD
|
||||
#define EPROTO EPROTO
|
||||
#define ENOTSUP ENOTSUP
|
||||
#define EPFNOSUPPORT EPFNOSUPPORT
|
||||
#define EDQUOT EDQUOT
|
||||
#define EDIRINTOSELF EDIRINTOSELF
|
||||
#define ENOTRECOVERABLE ENOTRECOVERABLE
|
||||
#define EMAXERRNO EMAXERRNO
|
||||
|
||||
#define EWOULDBLOCK EAGAIN
|
||||
#define ELAST EMAXERRNO
|
Loading…
Add table
Add a link
Reference in a new issue