Errors.h: add ENOTRECOVERABLE and EOWNERDEAD from POSIX
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html Change-Id: I3c0a08d447c897b3caba8d365f8e5dbab7869f18 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4573 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
@@ -184,6 +184,8 @@
|
||||
#define HAIKU_ETIME B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 58)
|
||||
#define HAIKU_ETXTBSY B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 59)
|
||||
#define HAIKU_ENOATTR B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 60)
|
||||
#define HAIKU_ENOTRECOVERABLE B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 61)
|
||||
#define HAIKU_EOWNERDEAD B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 62)
|
||||
|
||||
/* B_NO_MEMORY (0x80000000) can't be negated, so it needs special handling */
|
||||
#define HAIKU_ENOMEM B_NO_MEMORY
|
||||
|
||||
@@ -188,6 +188,8 @@
|
||||
#define ETIME B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 58)
|
||||
#define ETXTBSY B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 59)
|
||||
#define ENOATTR B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 60)
|
||||
#define ENOTRECOVERABLE B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 61)
|
||||
#define EOWNERDEAD B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 62)
|
||||
|
||||
/* B_NO_MEMORY (0x80000000) can't be negated, so it needs special handling */
|
||||
#ifdef B_USE_POSITIVE_POSIX_ERRORS
|
||||
|
||||
@@ -287,6 +287,13 @@ struct error_pair {
|
||||
E(ETIMEDOUT),
|
||||
#ifdef ETXTBSY
|
||||
E(ETXTBSY),
|
||||
#endif
|
||||
E(ENOATTR),
|
||||
#ifdef ENOTRECOVERABLE
|
||||
E(ENOTRECOVERABLE),
|
||||
#endif
|
||||
#ifdef EOWNERDEAD
|
||||
E(EOWNERDEAD),
|
||||
#endif
|
||||
E(EWOULDBLOCK),
|
||||
E(EXDEV),
|
||||
|
||||
@@ -532,6 +532,10 @@ error_description(int error)
|
||||
return "Text file busy";
|
||||
case ENOATTR:
|
||||
return "No such attribute";
|
||||
case ENOTRECOVERABLE:
|
||||
return "State not recoverable";
|
||||
case EOWNERDEAD:
|
||||
return "Previous owner died";
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user