Index: head/cddl/lib/libdtrace/errno.d =================================================================== --- head/cddl/lib/libdtrace/errno.d (revision 343110) +++ head/cddl/lib/libdtrace/errno.d (revision 343111) @@ -1,348 +1,351 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END * * Portions Copyright 2006-2008 John Birrell jb@freebsd.org * Portions Copyright 2018 Devin Teske dteske@freebsd.org * * $FreeBSD$ */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ inline int EPERM = 1; #pragma D binding "1.0" EPERM inline int ENOENT = 2; #pragma D binding "1.0" ENOENT inline int ESRCH = 3; #pragma D binding "1.0" ESRCH inline int EINTR = 4; #pragma D binding "1.0" EINTR inline int EIO = 5; #pragma D binding "1.0" EIO inline int ENXIO = 6; #pragma D binding "1.0" ENXIO inline int E2BIG = 7; #pragma D binding "1.0" E2BIG inline int ENOEXEC = 8; #pragma D binding "1.0" ENOEXEC inline int EBADF = 9; #pragma D binding "1.0" EBADF inline int ECHILD = 10; #pragma D binding "1.0" ECHILD inline int EDEADLK = 11; #pragma D binding "1.0" EDEADLK inline int ENOMEM = 12; #pragma D binding "1.0" ENOMEM inline int EACCES = 13; #pragma D binding "1.0" EACCES inline int EFAULT = 14; #pragma D binding "1.0" EFAULT inline int ENOTBLK = 15; #pragma D binding "1.0" ENOTBLK inline int EBUSY = 16; #pragma D binding "1.0" EBUSY inline int EEXIST = 17; #pragma D binding "1.0" EEXIST inline int EXDEV = 18; #pragma D binding "1.0" EXDEV inline int ENODEV = 19; #pragma D binding "1.0" ENODEV inline int ENOTDIR = 20; #pragma D binding "1.0" ENOTDIR inline int EISDIR = 21; #pragma D binding "1.0" EISDIR inline int EINVAL = 22; #pragma D binding "1.0" EINVAL inline int ENFILE = 23; #pragma D binding "1.0" ENFILE inline int EMFILE = 24; #pragma D binding "1.0" EMFILE inline int ENOTTY = 25; #pragma D binding "1.0" ENOTTY inline int ETXTBSY = 26; #pragma D binding "1.0" ETXTBSY inline int EFBIG = 27; #pragma D binding "1.0" EFBIG inline int ENOSPC = 28; #pragma D binding "1.0" ENOSPC inline int ESPIPE = 29; #pragma D binding "1.0" ESPIPE inline int EROFS = 30; #pragma D binding "1.0" EROFS inline int EMLINK = 31; #pragma D binding "1.0" EMLINK inline int EPIPE = 32; #pragma D binding "1.0" EPIPE inline int EDOM = 33; #pragma D binding "1.0" EDOM inline int ERANGE = 34; #pragma D binding "1.0" ERANGE inline int EAGAIN = 35; #pragma D binding "1.0" EAGAIN inline int EWOULDBLOCK = EAGAIN; #pragma D binding "1.0" EWOULDBLOCK inline int EINPROGRESS = 36; #pragma D binding "1.0" EINPROGRESS inline int EALREADY = 37; #pragma D binding "1.0" EALREADY inline int ENOTSOCK = 38; #pragma D binding "1.0" ENOTSOCK inline int EDESTADDRREQ = 39; #pragma D binding "1.0" EDESTADDRREQ inline int EMSGSIZE = 40; #pragma D binding "1.0" EMSGSIZE inline int EPROTOTYPE = 41; #pragma D binding "1.0" EPROTOTYPE inline int ENOPROTOOPT = 42; #pragma D binding "1.0" ENOPROTOOPT inline int EPROTONOSUPPORT = 43; #pragma D binding "1.0" EPROTONOSUPPORT inline int ESOCKTNOSUPPORT = 44; #pragma D binding "1.0" ESOCKTNOSUPPORT inline int EOPNOTSUPP = 45; #pragma D binding "1.0" EOPNOTSUPP inline int ENOTSUP = EOPNOTSUPP; #pragma D binding "1.0" ENOTSUP inline int EPFNOSUPPORT = 46; #pragma D binding "1.0" EPFNOSUPPORT inline int EAFNOSUPPORT = 47; #pragma D binding "1.0" EAFNOSUPPORT inline int EADDRINUSE = 48; #pragma D binding "1.0" EADDRINUSE inline int EADDRNOTAVAIL = 49; #pragma D binding "1.0" EADDRNOTAVAIL inline int ENETDOWN = 50; #pragma D binding "1.0" ENETDOWN inline int ENETUNREACH = 51; #pragma D binding "1.0" ENETUNREACH inline int ENETRESET = 52; #pragma D binding "1.0" ENETRESET inline int ECONNABORTED = 53; #pragma D binding "1.0" ECONNABORTED inline int ECONNRESET = 54; #pragma D binding "1.0" ECONNRESET inline int ENOBUFS = 55; #pragma D binding "1.0" ENOBUFS inline int EISCONN = 56; #pragma D binding "1.0" EISCONN inline int ENOTCONN = 57; #pragma D binding "1.0" ENOTCONN inline int ESHUTDOWN = 58; #pragma D binding "1.0" ESHUTDOWN inline int ETOOMANYREFS = 59; #pragma D binding "1.0" ETOOMANYREFS inline int ETIMEDOUT = 60; #pragma D binding "1.0" ETIMEDOUT inline int ECONNREFUSED = 61; #pragma D binding "1.0" ECONNREFUSED inline int ELOOP = 62; #pragma D binding "1.0" ELOOP inline int ENAMETOOLONG = 63; #pragma D binding "1.0" ENAMETOOLONG inline int EHOSTDOWN = 64; #pragma D binding "1.0" EHOSTDOWN inline int EHOSTUNREACH = 65; #pragma D binding "1.0" EHOSTUNREACH inline int ENOTEMPTY = 66; #pragma D binding "1.0" ENOTEMPTY inline int EPROCLIM = 67; #pragma D binding "1.0" EPROCLIM inline int EUSERS = 68; #pragma D binding "1.0" EUSERS inline int EDQUOT = 69; #pragma D binding "1.0" EDQUOT inline int ESTALE = 70; #pragma D binding "1.0" ESTALE inline int EREMOTE = 71; #pragma D binding "1.0" EREMOTE inline int EBADRPC = 72; #pragma D binding "1.0" EBADRPC inline int ERPCMISMATCH = 73; #pragma D binding "1.0" ERPCMISMATCH inline int EPROGUNAVAIL = 74; #pragma D binding "1.0" EPROGUNAVAIL inline int EPROGMISMATCH = 75; #pragma D binding "1.0" EPROGMISMATCH inline int EPROCUNAVAIL = 76; #pragma D binding "1.0" EPROCUNAVAIL inline int ENOLCK = 77; #pragma D binding "1.0" ENOLCK inline int ENOSYS = 78; #pragma D binding "1.0" ENOSYS inline int EFTYPE = 79; #pragma D binding "1.0" EFTYPE inline int EAUTH = 80; #pragma D binding "1.0" EAUTH inline int ENEEDAUTH = 81; #pragma D binding "1.0" ENEEDAUTH inline int EIDRM = 82; #pragma D binding "1.0" EIDRM inline int ENOMSG = 83; #pragma D binding "1.0" ENOMSG inline int EOVERFLOW = 84; #pragma D binding "1.0" EOVERFLOW inline int ECANCELED = 85; #pragma D binding "1.0" ECANCELED inline int EILSEQ = 86; #pragma D binding "1.0" EILSEQ inline int ENOATTR = 87; #pragma D binding "1.0" ENOATTR inline int EDOOFUS = 88; #pragma D binding "1.0" EDOOFUS inline int EBADMSG = 89; #pragma D binding "1.0" EBADMSG inline int EMULTIHOP = 90; #pragma D binding "1.0" EMULTIHOP inline int ENOLINK = 91; #pragma D binding "1.0" ENOLINK inline int EPROTO = 92; #pragma D binding "1.0" EPROTO inline int ENOTCAPABLE = 93; #pragma D binding "1.13" ENOTCAPABLE inline int ECAPMODE = 94; #pragma D binding "1.13" ECAPMODE inline int ENOTRECOVERABLE = 95; #pragma D binding "1.13" ENOTRECOVERABLE inline int EOWNERDEAD = 96; #pragma D binding "1.13" EOWNERDEAD -inline int ELAST = 96; +inline int EINTEGRITY = 96; +#pragma D binding "1.13" EINTEGRITY +inline int ELAST = 97; #pragma D binding "1.0" ELAST inline int ERESTART = -1; #pragma D binding "1.0" ERESTART inline int EJUSTRETURN = -2; #pragma D binding "1.0" EJUSTRETURN inline int ENOIOCTL = -3; #pragma D binding "1.0" ENOIOCTL inline int EDIRIOCTL = -4; #pragma D binding "1.0" EDIRIOCTL inline int ERELOOKUP = -5; #pragma D binding "1.13" ERELOOKUP /* * Error strings from */ #pragma D binding "1.13" strerror inline string strerror[int errno] = errno == 0 ? "Success" : errno == EPERM ? "Operation not permitted" : errno == ENOENT ? "No such file or directory" : errno == ESRCH ? "No such process" : errno == EINTR ? "Interrupted system call" : errno == EIO ? "Input/output error" : errno == ENXIO ? "Device not configured" : errno == E2BIG ? "Argument list too long" : errno == ENOEXEC ? "Exec format error" : errno == EBADF ? "Bad file descriptor" : errno == ECHILD ? "No child processes" : errno == EDEADLK ? "Resource deadlock avoided" : errno == ENOMEM ? "Cannot allocate memory" : errno == EACCES ? "Permission denied" : errno == EFAULT ? "Bad address" : errno == ENOTBLK ? "Block device required" : errno == EBUSY ? "Device busy" : errno == EEXIST ? "File exists" : errno == EXDEV ? "Cross-device link" : errno == ENODEV ? "Operation not supported by device" : errno == ENOTDIR ? "Not a directory" : errno == EISDIR ? "Is a directory" : errno == EINVAL ? "Invalid argument" : errno == ENFILE ? "Too many open files in system" : errno == EMFILE ? "Too many open files" : errno == ENOTTY ? "Inappropriate ioctl for device" : errno == ETXTBSY ? "Text file busy" : errno == EFBIG ? "File too large" : errno == ENOSPC ? "No space left on device" : errno == ESPIPE ? "Illegal seek" : errno == EROFS ? "Read-only filesystem" : errno == EMLINK ? "Too many links" : errno == EPIPE ? "Broken pipe" : errno == EDOM ? "Numerical argument out of domain" : errno == ERANGE ? "Result too large" : errno == EAGAIN ? "Resource temporarily unavailable" : errno == EINPROGRESS ? "Operation now in progress" : errno == EALREADY ? "Operation already in progress" : errno == ENOTSOCK ? "Socket operation on non-socket" : errno == EDESTADDRREQ ? "Destination address required" : errno == EMSGSIZE ? "Message too long" : errno == EPROTOTYPE ? "Protocol wrong type for socket" : errno == ENOPROTOOPT ? "Protocol not available" : errno == EPROTONOSUPPORT ? "Protocol not supported" : errno == ESOCKTNOSUPPORT ? "Socket type not supported" : errno == EOPNOTSUPP ? "Operation not supported" : errno == EPFNOSUPPORT ? "Protocol family not supported" : errno == EAFNOSUPPORT ? "Address family not supported by protocol family" : errno == EADDRINUSE ? "Address already in use" : errno == EADDRNOTAVAIL ? "Can't assign requested address" : errno == ENETDOWN ? "Network is down" : errno == ENETUNREACH ? "Network is unreachable" : errno == ENETRESET ? "Network dropped connection on reset" : errno == ECONNABORTED ? "Software caused connection abort" : errno == ECONNRESET ? "Connection reset by peer" : errno == ENOBUFS ? "No buffer space available" : errno == EISCONN ? "Socket is already connected" : errno == ENOTCONN ? "Socket is not connected" : errno == ESHUTDOWN ? "Can't send after socket shutdown" : errno == ETOOMANYREFS ? "Too many references: can't splice" : errno == ETIMEDOUT ? "Operation timed out" : errno == ECONNREFUSED ? "Connection refused" : errno == ELOOP ? "Too many levels of symbolic links" : errno == ENAMETOOLONG ? "File name too long" : errno == EHOSTDOWN ? "Host is down" : errno == EHOSTUNREACH ? "No route to host" : errno == ENOTEMPTY ? "Directory not empty" : errno == EPROCLIM ? "Too many processes" : errno == EUSERS ? "Too many users" : errno == EDQUOT ? "Disc quota exceeded" : errno == ESTALE ? "Stale NFS file handle" : errno == EREMOTE ? "Too many levels of remote in path" : errno == EBADRPC ? "RPC struct is bad" : errno == ERPCMISMATCH ? "RPC version wrong" : errno == EPROGUNAVAIL ? "RPC prog. not avail" : errno == EPROGMISMATCH ? "Program version wrong" : errno == EPROCUNAVAIL ? "Bad procedure for program" : errno == ENOLCK ? "No locks available" : errno == ENOSYS ? "Function not implemented" : errno == EFTYPE ? "Inappropriate file type or format" : errno == EAUTH ? "Authentication error" : errno == ENEEDAUTH ? "Need authenticator" : errno == EIDRM ? "Identifier removed" : errno == ENOMSG ? "No message of desired type" : errno == EOVERFLOW ? "Value too large to be stored in data type" : errno == ECANCELED ? "Operation canceled" : errno == EILSEQ ? "Illegal byte sequence" : errno == ENOATTR ? "Attribute not found" : errno == EDOOFUS ? "Programming error" : errno == EBADMSG ? "Bad message" : errno == EMULTIHOP ? "Multihop attempted" : errno == ENOLINK ? "Link has been severed" : errno == EPROTO ? "Protocol error" : errno == ENOTCAPABLE ? "Capabilities insufficient" : errno == ECAPMODE ? "Not permitted in capability mode" : errno == ENOTRECOVERABLE ? "State not recoverable" : errno == EOWNERDEAD ? "Previous owner died" : + errno == EINTEGRITY ? "Integrity check failed" : errno == ERESTART ? "restart syscall" : errno == EJUSTRETURN ? "don't modify regs, just return" : errno == ENOIOCTL ? "ioctl not handled by this layer" : errno == EDIRIOCTL ? "do direct ioctl in GEOM" : errno == ERELOOKUP ? "retry the directory lookup" : "Unknown error"; Index: head/contrib/libc++/include/__errc =================================================================== --- head/contrib/libc++/include/__errc (revision 343110) +++ head/contrib/libc++/include/__errc (revision 343111) @@ -1,218 +1,220 @@ // -*- C++ -*- //===---------------------------- __errc ----------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef _LIBCPP___ERRC #define _LIBCPP___ERRC /* system_error synopsis namespace std { enum class errc { address_family_not_supported, // EAFNOSUPPORT address_in_use, // EADDRINUSE address_not_available, // EADDRNOTAVAIL already_connected, // EISCONN argument_list_too_long, // E2BIG argument_out_of_domain, // EDOM bad_address, // EFAULT bad_file_descriptor, // EBADF bad_message, // EBADMSG broken_pipe, // EPIPE connection_aborted, // ECONNABORTED connection_already_in_progress, // EALREADY connection_refused, // ECONNREFUSED connection_reset, // ECONNRESET cross_device_link, // EXDEV destination_address_required, // EDESTADDRREQ device_or_resource_busy, // EBUSY directory_not_empty, // ENOTEMPTY executable_format_error, // ENOEXEC file_exists, // EEXIST file_too_large, // EFBIG filename_too_long, // ENAMETOOLONG function_not_supported, // ENOSYS host_unreachable, // EHOSTUNREACH identifier_removed, // EIDRM illegal_byte_sequence, // EILSEQ inappropriate_io_control_operation, // ENOTTY + integrity_check_failed, // EINTEGRITY interrupted, // EINTR invalid_argument, // EINVAL invalid_seek, // ESPIPE io_error, // EIO is_a_directory, // EISDIR message_size, // EMSGSIZE network_down, // ENETDOWN network_reset, // ENETRESET network_unreachable, // ENETUNREACH no_buffer_space, // ENOBUFS no_child_process, // ECHILD no_link, // ENOLINK no_lock_available, // ENOLCK no_message_available, // ENODATA no_message, // ENOMSG no_protocol_option, // ENOPROTOOPT no_space_on_device, // ENOSPC no_stream_resources, // ENOSR no_such_device_or_address, // ENXIO no_such_device, // ENODEV no_such_file_or_directory, // ENOENT no_such_process, // ESRCH not_a_directory, // ENOTDIR not_a_socket, // ENOTSOCK not_a_stream, // ENOSTR not_connected, // ENOTCONN not_enough_memory, // ENOMEM not_supported, // ENOTSUP operation_canceled, // ECANCELED operation_in_progress, // EINPROGRESS operation_not_permitted, // EPERM operation_not_supported, // EOPNOTSUPP operation_would_block, // EWOULDBLOCK owner_dead, // EOWNERDEAD permission_denied, // EACCES protocol_error, // EPROTO protocol_not_supported, // EPROTONOSUPPORT read_only_file_system, // EROFS resource_deadlock_would_occur, // EDEADLK resource_unavailable_try_again, // EAGAIN result_out_of_range, // ERANGE state_not_recoverable, // ENOTRECOVERABLE stream_timeout, // ETIME text_file_busy, // ETXTBSY timed_out, // ETIMEDOUT too_many_files_open_in_system, // ENFILE too_many_files_open, // EMFILE too_many_links, // EMLINK too_many_symbolic_link_levels, // ELOOP value_too_large, // EOVERFLOW wrong_protocol_type // EPROTOTYPE }; */ #include <__config> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD // Some error codes are not present on all platforms, so we provide equivalents // for them: //enum class errc _LIBCPP_DECLARE_STRONG_ENUM(errc) { address_family_not_supported = EAFNOSUPPORT, address_in_use = EADDRINUSE, address_not_available = EADDRNOTAVAIL, already_connected = EISCONN, argument_list_too_long = E2BIG, argument_out_of_domain = EDOM, bad_address = EFAULT, bad_file_descriptor = EBADF, bad_message = EBADMSG, broken_pipe = EPIPE, connection_aborted = ECONNABORTED, connection_already_in_progress = EALREADY, connection_refused = ECONNREFUSED, connection_reset = ECONNRESET, cross_device_link = EXDEV, destination_address_required = EDESTADDRREQ, device_or_resource_busy = EBUSY, directory_not_empty = ENOTEMPTY, executable_format_error = ENOEXEC, file_exists = EEXIST, file_too_large = EFBIG, filename_too_long = ENAMETOOLONG, function_not_supported = ENOSYS, host_unreachable = EHOSTUNREACH, identifier_removed = EIDRM, illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, + integrity_check_failed = EINTEGRITY, interrupted = EINTR, invalid_argument = EINVAL, invalid_seek = ESPIPE, io_error = EIO, is_a_directory = EISDIR, message_size = EMSGSIZE, network_down = ENETDOWN, network_reset = ENETRESET, network_unreachable = ENETUNREACH, no_buffer_space = ENOBUFS, no_child_process = ECHILD, no_link = ENOLINK, no_lock_available = ENOLCK, #ifdef ENODATA no_message_available = ENODATA, #else no_message_available = ENOMSG, #endif no_message = ENOMSG, no_protocol_option = ENOPROTOOPT, no_space_on_device = ENOSPC, #ifdef ENOSR no_stream_resources = ENOSR, #else no_stream_resources = ENOMEM, #endif no_such_device_or_address = ENXIO, no_such_device = ENODEV, no_such_file_or_directory = ENOENT, no_such_process = ESRCH, not_a_directory = ENOTDIR, not_a_socket = ENOTSOCK, #ifdef ENOSTR not_a_stream = ENOSTR, #else not_a_stream = EINVAL, #endif not_connected = ENOTCONN, not_enough_memory = ENOMEM, not_supported = ENOTSUP, operation_canceled = ECANCELED, operation_in_progress = EINPROGRESS, operation_not_permitted = EPERM, operation_not_supported = EOPNOTSUPP, operation_would_block = EWOULDBLOCK, owner_dead = EOWNERDEAD, permission_denied = EACCES, protocol_error = EPROTO, protocol_not_supported = EPROTONOSUPPORT, read_only_file_system = EROFS, resource_deadlock_would_occur = EDEADLK, resource_unavailable_try_again = EAGAIN, result_out_of_range = ERANGE, state_not_recoverable = ENOTRECOVERABLE, #ifdef ETIME stream_timeout = ETIME, #else stream_timeout = ETIMEDOUT, #endif text_file_busy = ETXTBSY, timed_out = ETIMEDOUT, too_many_files_open_in_system = ENFILE, too_many_files_open = EMFILE, too_many_links = EMLINK, too_many_symbolic_link_levels = ELOOP, value_too_large = EOVERFLOW, wrong_protocol_type = EPROTOTYPE }; _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc) _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___ERRC Index: head/contrib/libc++/include/errno.h =================================================================== --- head/contrib/libc++/include/errno.h (revision 343110) +++ head/contrib/libc++/include/errno.h (revision 343111) @@ -1,398 +1,425 @@ // -*- C++ -*- //===-------------------------- errno.h -----------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_ERRNO_H #define _LIBCPP_ERRNO_H /* errno.h synopsis Macros: EDOM EILSEQ // C99 ERANGE errno */ #include <__config> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif #include_next #ifdef __cplusplus -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) #ifdef ELAST static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; +static const int __elast2 = ELAST+3; #else static const int __elast1 = 104; static const int __elast2 = 105; +static const int __elast2 = 106; #endif -#ifdef ENOTRECOVERABLE +#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#define EINTEGRITY __elast3 +#ifdef ELAST +#undef ELAST +#define ELAST EINTEGRITY +#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#ifdef ELAST +#undef ELAST +#define ELAST EOWNERDEAD + +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 +#define EINTEGRITY __elast2 +#ifdef ELAST +#undef ELAST +#define ELAST EINTEGRITY +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define EOWNERDEAD __elast1 #ifdef ELAST #undef ELAST #define ELAST EOWNERDEAD -#endif -#elif defined(EOWNERDEAD) +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EINTEGRITY __elast2 +#ifdef ELAST +#undef ELAST +#define ELAST EINTEGRITY +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 #ifdef ELAST #undef ELAST #define ELAST ENOTRECOVERABLE -#endif -#else // defined(EOWNERDEAD) - -#define EOWNERDEAD __elast1 -#define ENOTRECOVERABLE __elast2 +#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define EINTEGRITY __elast1 #ifdef ELAST #undef ELAST -#define ELAST ENOTRECOVERABLE -#endif +#define ELAST EINTEGRITY -#endif // defined(EOWNERDEAD) +#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && !defined(INTEGRITY) -#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) +#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || !defined(INTEGRITY) // supply errno values likely to be missing, particularly on Windows #ifndef EAFNOSUPPORT #define EAFNOSUPPORT 9901 #endif #ifndef EADDRINUSE #define EADDRINUSE 9902 #endif #ifndef EADDRNOTAVAIL #define EADDRNOTAVAIL 9903 #endif #ifndef EISCONN #define EISCONN 9904 #endif #ifndef EBADMSG #define EBADMSG 9905 #endif #ifndef ECONNABORTED #define ECONNABORTED 9906 #endif #ifndef EALREADY #define EALREADY 9907 #endif #ifndef ECONNREFUSED #define ECONNREFUSED 9908 #endif #ifndef ECONNRESET #define ECONNRESET 9909 #endif #ifndef EDESTADDRREQ #define EDESTADDRREQ 9910 #endif #ifndef EHOSTUNREACH #define EHOSTUNREACH 9911 #endif #ifndef EIDRM #define EIDRM 9912 #endif #ifndef EMSGSIZE #define EMSGSIZE 9913 #endif #ifndef ENETDOWN #define ENETDOWN 9914 #endif #ifndef ENETRESET #define ENETRESET 9915 #endif #ifndef ENETUNREACH #define ENETUNREACH 9916 #endif #ifndef ENOBUFS #define ENOBUFS 9917 #endif #ifndef ENOLINK #define ENOLINK 9918 #endif #ifndef ENODATA #define ENODATA 9919 #endif #ifndef ENOMSG #define ENOMSG 9920 #endif #ifndef ENOPROTOOPT #define ENOPROTOOPT 9921 #endif #ifndef ENOSR #define ENOSR 9922 #endif #ifndef ENOTSOCK #define ENOTSOCK 9923 #endif #ifndef ENOSTR #define ENOSTR 9924 #endif #ifndef ENOTCONN #define ENOTCONN 9925 #endif #ifndef ENOTSUP #define ENOTSUP 9926 #endif #ifndef ECANCELED #define ECANCELED 9927 #endif #ifndef EINPROGRESS #define EINPROGRESS 9928 #endif #ifndef EOPNOTSUPP #define EOPNOTSUPP 9929 #endif #ifndef EWOULDBLOCK #define EWOULDBLOCK 9930 #endif #ifndef EOWNERDEAD #define EOWNERDEAD 9931 #endif #ifndef EPROTO #define EPROTO 9932 #endif #ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT 9933 #endif #ifndef ENOTRECOVERABLE #define ENOTRECOVERABLE 9934 #endif #ifndef ETIME #define ETIME 9935 #endif #ifndef ETXTBSY #define ETXTBSY 9936 #endif #ifndef ETIMEDOUT #define ETIMEDOUT 9938 #endif #ifndef ELOOP #define ELOOP 9939 #endif #ifndef EOVERFLOW #define EOVERFLOW 9940 #endif #ifndef EPROTOTYPE #define EPROTOTYPE 9941 #endif #ifndef ENOSYS #define ENOSYS 9942 #endif #ifndef EINVAL #define EINVAL 9943 #endif #ifndef ERANGE #define ERANGE 9944 #endif #ifndef EILSEQ #define EILSEQ 9945 #endif // Windows Mobile doesn't appear to define these: #ifndef E2BIG #define E2BIG 9946 #endif #ifndef EDOM #define EDOM 9947 #endif #ifndef EFAULT #define EFAULT 9948 #endif #ifndef EBADF #define EBADF 9949 #endif #ifndef EPIPE #define EPIPE 9950 #endif #ifndef EXDEV #define EXDEV 9951 #endif #ifndef EBUSY #define EBUSY 9952 #endif #ifndef ENOTEMPTY #define ENOTEMPTY 9953 #endif #ifndef ENOEXEC #define ENOEXEC 9954 #endif #ifndef EEXIST #define EEXIST 9955 #endif #ifndef EFBIG #define EFBIG 9956 #endif #ifndef ENAMETOOLONG #define ENAMETOOLONG 9957 #endif #ifndef ENOTTY #define ENOTTY 9958 #endif #ifndef EINTR #define EINTR 9959 #endif #ifndef ESPIPE #define ESPIPE 9960 #endif #ifndef EIO #define EIO 9961 #endif #ifndef EISDIR #define EISDIR 9962 #endif #ifndef ECHILD #define ECHILD 9963 #endif #ifndef ENOLCK #define ENOLCK 9964 #endif #ifndef ENOSPC #define ENOSPC 9965 #endif #ifndef ENXIO #define ENXIO 9966 #endif #ifndef ENODEV #define ENODEV 9967 #endif #ifndef ENOENT #define ENOENT 9968 #endif #ifndef ESRCH #define ESRCH 9969 #endif #ifndef ENOTDIR #define ENOTDIR 9970 #endif #ifndef ENOMEM #define ENOMEM 9971 #endif #ifndef EPERM #define EPERM 9972 #endif #ifndef EACCES #define EACCES 9973 #endif #ifndef EROFS #define EROFS 9974 #endif #ifndef EDEADLK #define EDEADLK 9975 #endif #ifndef EAGAIN #define EAGAIN 9976 #endif #ifndef ENFILE #define ENFILE 9977 #endif #ifndef EMFILE #define EMFILE 9978 #endif #ifndef EMLINK #define EMLINK 9979 +#endif + +#ifndef EINTEGRITY +#define EINTEGRITY 9980 #endif #endif // __cplusplus #endif // _LIBCPP_ERRNO_H Index: head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po =================================================================== --- head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po (revision 343110) +++ head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po (revision 343111) @@ -1,459 +1,463 @@ # # Copyright (c) 1982, 1985, 1993 # The Regents of the University of California. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # List of system errors ala strerror() and sys_errlist # Phil Shafer , 2015. # msgid "" msgstr "" "Project-Id-Version: libxo test\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-07-01 16:15-0400\n" "PO-Revision-Date: 2015-07-02 00:37-0500\n" "Language: teo\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==0) ? 0 : (n==1) ? 1 : 2;\n" "Last-Translator: P.S. \n" "Language-Team: self inflicted \n" "X-Generator: Poedit 1.8.1\n" "X-Poedit-SourceCharset: iso-8859-1\n" # 0 - ENOERROR msgid "No error: 0" msgstr "Onyay erroryay" # 1 - EPERM msgid "Operation not permitted" msgstr "Operationyay otnay ermittedpay" # 2 - ENOENT msgid "No such file or directory" msgstr "Onay uchsay ilefay oryay irectoryday" # 3 - ESRCH msgid "No such process" msgstr "Onay uchsay ocesspray" # 4 - EINTR msgid "Interrupted system call" msgstr "Interruptedyay ystemsay allcay" # 5 - EIO msgid "Input/output error" msgstr "Input/outputyay erroryay" # 6 - ENXIO msgid "Device not configured" msgstr "Eviceday otnay onfiguredcay" # 7 - E2BIG msgid "Argument list too long" msgstr "Argumentyay istlay ootay onglay" # 8 - ENOEXEC msgid "Exec format error" msgstr "Execway ormatfay errorway" # 9 - EBADF msgid "Bad file descriptor" msgstr "Adbay ilefay escriptorday" # 10 - ECHILD msgid "No child processes" msgstr "Onay ildchay ocessespray" # 11 - EDEADLK msgid "Resource deadlock avoided" msgstr "Esourceray eadlockday avoidedway" # 12 - ENOMEM msgid "Cannot allocate memory" msgstr "Annotcay allocateway emorymay" # 13 - EACCES msgid "Permission denied" msgstr "Ermissionpay eniedday" # 14 - EFAULT msgid "Bad address" msgstr "Adbay addressway" # 15 - ENOTBLK msgid "Block device required" msgstr "Ockblay eviceday equiredray" # 16 - EBUSY msgid "Device busy" msgstr "Eviceday usybay" # 17 - EEXIST msgid "File exists" msgstr "Ilefay existsway" # 18 - EXDEV msgid "Cross-device link" msgstr "Osscray-eviceday inklay" # 19 - ENODEV msgid "Operation not supported by device" msgstr "Operationway otnay upportedsay ybay eviceday" # 20 - ENOTDIR msgid "Not a directory" msgstr "Otnay away irectoryday" # 21 - EISDIR msgid "Is a directory" msgstr "Isway away irectoryday" # 22 - EINVAL msgid "Invalid argument" msgstr "Invalidway argumentway" # 23 - ENFILE msgid "Too many open files in system" msgstr "Ootay anymay openway ilesfay inway ystemsay" # 24 - EMFILE msgid "Too many open files" msgstr "Ootay anymay openway ilesfay" # 25 - ENOTTY msgid "Inappropriate ioctl for device" msgstr "Inappropriateway ioctlway orfay eviceday" # 26 - ETXTBSY msgid "Text file busy" msgstr "Exttay ilefay usybay" # 27 - EFBIG msgid "File too large" msgstr "Ilefay ootay argelay" # 28 - ENOSPC msgid "No space left on device" msgstr "Onay acespay eftlay onway eviceday" # 29 - ESPIPE msgid "Illegal seek" msgstr "Illegalway eeksay" # 30 - EROFS msgid "Read-only file system" msgstr "Eadray-onlyway ilefay ystemsay" # 31 - EMLINK msgid "Too many links" msgstr "Ootay anymay inkslay" # 32 - EPIPE msgid "Broken pipe" msgstr "Okenbray ipepay" # # math software # # 33 - EDOM msgid "Numerical argument out of domain" msgstr "Umericalnay argumentway outway ofway omainday" # 34 - ERANGE msgid "Result too large" msgstr "Esultray ootay argelay" # # non-blocking and interrupt i/o # # 35 - EAGAIN # 35 - EWOULDBLOCK msgid "Resource temporarily unavailable" msgstr "Esourceray emporarilytay unavailableway" # 36 - EINPROGRESS msgid "Operation now in progress" msgstr "Operationway ownay inway ogresspray" # 37 - EALREADY msgid "Operation already in progress" msgstr "Operationway alreadyway inway ogresspray" # # ipc/network software -- argument errors # # 38 - ENOTSOCK msgid "Socket operation on non-socket" msgstr "Ocketsay operationway onway onnay-ocketsay" # 39 - EDESTADDRREQ msgid "Destination address required" msgstr "Estinationday addressway equiredray" # 40 - EMSGSIZE msgid "Message too long" msgstr "Essagemay ootay onglay" # 41 - EPROTOTYPE msgid "Protocol wrong type for socket" msgstr "Otocolpray ongwray ypetay orfay ocketsay" # 42 - ENOPROTOOPT msgid "Protocol not available" msgstr "Otocolpray otnay availableway" # 43 - EPROTONOSUPPORT msgid "Protocol not supported" msgstr "Otocolpray otnay upportedsay" # 44 - ESOCKTNOSUPPORT msgid "Socket type not supported" msgstr "Ocketsay ypetay otnay upportedsay" # 45 - EOPNOTSUPP msgid "Operation not supported" msgstr "Operationway otnay upportedsay" # 46 - EPFNOSUPPORT msgid "Protocol family not supported" msgstr "Otocolpray amilyfay otnay upportedsay" # 47 - EAFNOSUPPORT msgid "Address family not supported by protocol family" msgstr "Addressway amilyfay otnay upportedsay ybay otocolpray amilyfay" # 48 - EADDRINUSE msgid "Address already in use" msgstr "Addressway alreadyway inway useway" # 49 - EADDRNOTAVAIL msgid "Can't assign requested address" msgstr "An'tcay assignway equestedray addressway" # # ipc/network software -- operational errors # # 50 - ENETDOWN msgid "Network is down" msgstr "Etworknay isway ownday" # 51 - ENETUNREACH msgid "Network is unreachable" msgstr "Etworknay isway unreachableway" # 52 - ENETRESET msgid "Network dropped connection on reset" msgstr "Etworknay oppeddray onnectioncay onway esetray" # 53 - ECONNABORTED msgid "Software caused connection abort" msgstr "Oftwaresay ausedcay onnectioncay abortway" # 54 - ECONNRESET msgid "Connection reset by peer" msgstr "Onnectioncay esetray ybay eerpay" # 55 - ENOBUFS msgid "No buffer space available" msgstr "Onay ufferbay acespay availableway" # 56 - EISCONN msgid "Socket is already connected" msgstr "Ocketsay isway alreadyway onnectedcay" # 57 - ENOTCONN msgid "Socket is not connected" msgstr "Ocketsay isway otnay onnectedcay" # 58 - ESHUTDOWN msgid "Can't send after socket shutdown" msgstr "An'tcay endsay afterway ocketsay utdownshay" # 59 - ETOOMANYREFS msgid "Too many references: can't splice" msgstr "Ootay anymay eferencesray: an'tcay icesplay" # 60 - ETIMEDOUT msgid "Operation timed out" msgstr "Operationway imedtay outway" # 61 - ECONNREFUSED msgid "Connection refused" msgstr "Onnectioncay efusedray" # 62 - ELOOP msgid "Too many levels of symbolic links" msgstr "Ootay anymay evelslay ofway ymbolicsay inkslay" # 63 - ENAMETOOLONG msgid "File name too long" msgstr "Ilefay amenay ootay onglay" # # should be rearranged # # 64 - EHOSTDOWN msgid "Host is down" msgstr "Osthay isway ownday" # 65 - EHOSTUNREACH msgid "No route to host" msgstr "Onay outeray otay osthay" # 66 - ENOTEMPTY msgid "Directory not empty" msgstr "Irectoryday otnay emptyway" # # quotas & mush # # 67 - EPROCLIM msgid "Too many processes" msgstr "Ootay anymay ocessespray" # 68 - EUSERS msgid "Too many users" msgstr "Ootay anymay usersway" # 69 - EDQUOT msgid "Disc quota exceeded" msgstr "Iscday otaquay exceededway" # # Network File System # # 70 - ESTALE msgid "Stale NFS file handle" msgstr "Alestay NFSAY ilefay andlehay" # 71 - EREMOTE msgid "Too many levels of remote in path" msgstr "Ootay anymay evelslay ofway emoteray inway athpay" # 72 - EBADRPC msgid "RPC struct is bad" msgstr "RPCAY uctstray isway adbay" # 73 - ERPCMISMATCH msgid "RPC version wrong" msgstr "RPCAY ersionvay ongwray" # 74 - EPROGUNAVAIL msgid "RPC prog. not avail" msgstr "RPCAY ogpray. otnay availway" # 75 - EPROGMISMATCH msgid "Program version wrong" msgstr "Ogrampray ersionvay ongwray" # 76 - EPROCUNAVAIL msgid "Bad procedure for program" msgstr "Adbay ocedurepray orfay ogrampray" # 77 - ENOLCK msgid "No locks available" msgstr "Onay ockslay availableway" # 78 - ENOSYS msgid "Function not implemented" msgstr "Unctionfay otnay implementedway" # 79 - EFTYPE msgid "Inappropriate file type or format" msgstr "Inappropriateway ilefay ypetay orway ormatfay" # 80 - EAUTH msgid "Authentication error" msgstr "Authenticationway errorway" # 81 - ENEEDAUTH msgid "Need authenticator" msgstr "Eednay authenticatorway" # 82 - EIDRM msgid "Identifier removed" msgstr "Identifierway emovedray" # 83 - ENOMSG msgid "No message of desired type" msgstr "Onay essagemay ofway esiredday ypetay" # 84 - EOVERFLOW msgid "Value too large to be stored in data type" msgstr "Aluevay ootay argelay otay ebay oredstay inway ataday ypetay" # 85 - ECANCELED msgid "Operation canceled" msgstr "Operationway anceledcay" # 86 - EILSEQ msgid "Illegal byte sequence" msgstr "Illegalway ytebay equencesay" # 87 - ENOATTR msgid "Attribute not found" msgstr "Attributeway otnay oundfay" # # General # # 88 - EDOOFUS msgid "Programming error" msgstr "Ogrammingpray errorway" # 89 - EBADMSG msgid "Bad message" msgstr "Adbay essagemay" # 90 - EMULTIHOP msgid "Multihop attempted" msgstr "Ultihopmay attemptedway" # 91 - ENOLINK msgid "Link has been severed" msgstr "Inklay ashay eenbay everedsay" # 92 - EPROTO msgid "Protocol error" msgstr "Otocolpray errorway" # 93 - ENOTCAPABLE msgid "Capabilities insufficient" msgstr "Apabilitiescay insufficientway" # 94 - ECAPMODE msgid "Not permitted in capability mode" msgstr "Otnay ermittedpay inway apabilitycay odemay" # 95 - ENOTRECOVERABLE msgid "State not recoverable" msgstr "Atestay otnay ecoverableray" # 96 - EOWNERDEAD msgid "Previous owner died" msgstr "Eviouspray ownerway iedday" + +# 97 - EINTEGRITY +msgid "Integrity check failed" +msgstr "integrityyay eckchay ailedfay" Index: head/contrib/libxo/tests/gettext/strerror.pot =================================================================== --- head/contrib/libxo/tests/gettext/strerror.pot (revision 343110) +++ head/contrib/libxo/tests/gettext/strerror.pot (revision 343111) @@ -1,468 +1,472 @@ # # Copyright (c) 1982, 1985, 1993 # The Regents of the University of California. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # List of system errors ala strerror() and sys_errlist # Phil Shafer , 2015. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-07-01 16:15-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" msgid "Received {:received} {N:byte,bytes} from {:from}#{:port} in {:time} ms\n" msgstr "" # 0 - ENOERROR msgid "No error: 0" msgstr "" # 1 - EPERM msgid "Operation not permitted" msgstr "" # 2 - ENOENT msgid "No such file or directory" msgstr "" # 3 - ESRCH msgid "No such process" msgstr "" # 4 - EINTR msgid "Interrupted system call" msgstr "" # 5 - EIO msgid "Input/output error" msgstr "" # 6 - ENXIO msgid "Device not configured" msgstr "" # 7 - E2BIG msgid "Argument list too long" msgstr "" # 8 - ENOEXEC msgid "Exec format error" msgstr "" # 9 - EBADF msgid "Bad file descriptor" msgstr "" # 10 - ECHILD msgid "No child processes" msgstr "" # 11 - EDEADLK msgid "Resource deadlock avoided" msgstr "" # 12 - ENOMEM msgid "Cannot allocate memory" msgstr "" # 13 - EACCES msgid "Permission denied" msgstr "" # 14 - EFAULT msgid "Bad address" msgstr "" # 15 - ENOTBLK msgid "Block device required" msgstr "" # 16 - EBUSY msgid "Device busy" msgstr "" # 17 - EEXIST msgid "File exists" msgstr "" # 18 - EXDEV msgid "Cross-device link" msgstr "" # 19 - ENODEV msgid "Operation not supported by device" msgstr "" # 20 - ENOTDIR msgid "Not a directory" msgstr "" # 21 - EISDIR msgid "Is a directory" msgstr "" # 22 - EINVAL msgid "Invalid argument" msgstr "" # 23 - ENFILE msgid "Too many open files in system" msgstr "" # 24 - EMFILE msgid "Too many open files" msgstr "" # 25 - ENOTTY msgid "Inappropriate ioctl for device" msgstr "" # 26 - ETXTBSY msgid "Text file busy" msgstr "" # 27 - EFBIG msgid "File too large" msgstr "" # 28 - ENOSPC msgid "No space left on device" msgstr "" # 29 - ESPIPE msgid "Illegal seek" msgstr "" # 30 - EROFS msgid "Read-only file system" msgstr "" # 31 - EMLINK msgid "Too many links" msgstr "" # 32 - EPIPE msgid "Broken pipe" msgstr "" # # math software # # 33 - EDOM msgid "Numerical argument out of domain" msgstr "" # 34 - ERANGE msgid "Result too large" msgstr "" # # non-blocking and interrupt i/o # # 35 - EAGAIN # 35 - EWOULDBLOCK msgid "Resource temporarily unavailable" msgstr "" # 36 - EINPROGRESS msgid "Operation now in progress" msgstr "" # 37 - EALREADY msgid "Operation already in progress" msgstr "" # # ipc/network software -- argument errors # # 38 - ENOTSOCK msgid "Socket operation on non-socket" msgstr "" # 39 - EDESTADDRREQ msgid "Destination address required" msgstr "" # 40 - EMSGSIZE msgid "Message too long" msgstr "" # 41 - EPROTOTYPE msgid "Protocol wrong type for socket" msgstr "" # 42 - ENOPROTOOPT msgid "Protocol not available" msgstr "" # 43 - EPROTONOSUPPORT msgid "Protocol not supported" msgstr "" # 44 - ESOCKTNOSUPPORT msgid "Socket type not supported" msgstr "" # 45 - EOPNOTSUPP msgid "Operation not supported" msgstr "" # 46 - EPFNOSUPPORT msgid "Protocol family not supported" msgstr "" # 47 - EAFNOSUPPORT msgid "Address family not supported by protocol family" msgstr "" # 48 - EADDRINUSE msgid "Address already in use" msgstr "" # 49 - EADDRNOTAVAIL msgid "Can't assign requested address" msgstr "" # # ipc/network software -- operational errors # # 50 - ENETDOWN msgid "Network is down" msgstr "" # 51 - ENETUNREACH msgid "Network is unreachable" msgstr "" # 52 - ENETRESET msgid "Network dropped connection on reset" msgstr "" # 53 - ECONNABORTED msgid "Software caused connection abort" msgstr "" # 54 - ECONNRESET msgid "Connection reset by peer" msgstr "" # 55 - ENOBUFS msgid "No buffer space available" msgstr "" # 56 - EISCONN msgid "Socket is already connected" msgstr "" # 57 - ENOTCONN msgid "Socket is not connected" msgstr "" # 58 - ESHUTDOWN msgid "Can't send after socket shutdown" msgstr "" # 59 - ETOOMANYREFS msgid "Too many references: can't splice" msgstr "" # 60 - ETIMEDOUT msgid "Operation timed out" msgstr "" # 61 - ECONNREFUSED msgid "Connection refused" msgstr "" # 62 - ELOOP msgid "Too many levels of symbolic links" msgstr "" # 63 - ENAMETOOLONG msgid "File name too long" msgstr "" # # should be rearranged # # 64 - EHOSTDOWN msgid "Host is down" msgstr "" # 65 - EHOSTUNREACH msgid "No route to host" msgstr "" # 66 - ENOTEMPTY msgid "Directory not empty" msgstr "" # # quotas & mush # # 67 - EPROCLIM msgid "Too many processes" msgstr "" # 68 - EUSERS msgid "Too many users" msgstr "" # 69 - EDQUOT msgid "Disc quota exceeded" msgstr "" # # Network File System # # 70 - ESTALE msgid "Stale NFS file handle" msgstr "" # 71 - EREMOTE msgid "Too many levels of remote in path" msgstr "" # 72 - EBADRPC msgid "RPC struct is bad" msgstr "" # 73 - ERPCMISMATCH msgid "RPC version wrong" msgstr "" # 74 - EPROGUNAVAIL msgid "RPC prog. not avail" msgstr "" # 75 - EPROGMISMATCH msgid "Program version wrong" msgstr "" # 76 - EPROCUNAVAIL msgid "Bad procedure for program" msgstr "" # 77 - ENOLCK msgid "No locks available" msgstr "" # 78 - ENOSYS msgid "Function not implemented" msgstr "" # 79 - EFTYPE msgid "Inappropriate file type or format" msgstr "" # 80 - EAUTH msgid "Authentication error" msgstr "" # 81 - ENEEDAUTH msgid "Need authenticator" msgstr "" # 82 - EIDRM msgid "Identifier removed" msgstr "" # 83 - ENOMSG msgid "No message of desired type" msgstr "" # 84 - EOVERFLOW msgid "Value too large to be stored in data type" msgstr "" # 85 - ECANCELED msgid "Operation canceled" msgstr "" # 86 - EILSEQ msgid "Illegal byte sequence" msgstr "" # 87 - ENOATTR msgid "Attribute not found" msgstr "" # # General # # 88 - EDOOFUS msgid "Programming error" msgstr "" # 89 - EBADMSG msgid "Bad message" msgstr "" # 90 - EMULTIHOP msgid "Multihop attempted" msgstr "" # 91 - ENOLINK msgid "Link has been severed" msgstr "" # 92 - EPROTO msgid "Protocol error" msgstr "" # 93 - ENOTCAPABLE msgid "Capabilities insufficient" msgstr "" # 94 - ECAPMODE msgid "Not permitted in capability mode" msgstr "" # 95 - ENOTRECOVERABLE msgid "State not recoverable" msgstr "" # 96 - EOWNERDEAD msgid "Previous owner died" msgstr "" + +# 97 - EINTEGRITY +msgid "Integrity check failed" +msgstr "" Index: head/contrib/openbsm/libbsm/bsm_errno.c =================================================================== --- head/contrib/openbsm/libbsm/bsm_errno.c (revision 343110) +++ head/contrib/openbsm/libbsm/bsm_errno.c (revision 343111) @@ -1,771 +1,778 @@ /*- * Copyright (c) 2008 Apple Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include /* * Different operating systems use different numeric constants for different * error numbers, and sometimes error numbers don't exist in more than one * operating system. These routines convert between BSM and local error * number spaces, subject to the above realities. BSM error numbers are * stored in a single 8-bit character, so don't have a byte order. * * Don't include string definitions when this code is compiled into a kernel. */ struct bsm_errno { int be_bsm_errno; int be_local_errno; #if !defined(KERNEL) && !defined(_KERNEL) const char *be_strerror; #endif }; #define ERRNO_NO_LOCAL_MAPPING -600 #if !defined(KERNEL) && !defined(_KERNEL) #define ES(x) x #else #define ES(x) #endif /* * Mapping table -- please maintain in numeric sorted order with respect to * the BSM constant. Today we do a linear lookup, but could switch to a * binary search if it makes sense. We only ifdef errors that aren't * generally available, but it does make the table a lot more ugly. * * XXXRW: It would be nice to have a similar ordered table mapping to BSM * constant from local constant, but the order of local constants varies by * OS. Really we need to build that table at compile-time but don't do that * yet. * * XXXRW: We currently embed English-language error strings here, but should * support catalogues; these are only used if the OS doesn't have an error * string using strerror(3). */ static const struct bsm_errno bsm_errnos[] = { { BSM_ERRNO_ESUCCESS, 0, ES("Success") }, { BSM_ERRNO_EPERM, EPERM, ES("Operation not permitted") }, { BSM_ERRNO_ENOENT, ENOENT, ES("No such file or directory") }, { BSM_ERRNO_ESRCH, ESRCH, ES("No such process") }, { BSM_ERRNO_EINTR, EINTR, ES("Interrupted system call") }, { BSM_ERRNO_EIO, EIO, ES("Input/output error") }, { BSM_ERRNO_ENXIO, ENXIO, ES("Device not configured") }, { BSM_ERRNO_E2BIG, E2BIG, ES("Argument list too long") }, { BSM_ERRNO_ENOEXEC, ENOEXEC, ES("Exec format error") }, { BSM_ERRNO_EBADF, EBADF, ES("Bad file descriptor") }, { BSM_ERRNO_ECHILD, ECHILD, ES("No child processes") }, { BSM_ERRNO_EAGAIN, EAGAIN, ES("Resource temporarily unavailable") }, { BSM_ERRNO_ENOMEM, ENOMEM, ES("Cannot allocate memory") }, { BSM_ERRNO_EACCES, EACCES, ES("Permission denied") }, { BSM_ERRNO_EFAULT, EFAULT, ES("Bad address") }, { BSM_ERRNO_ENOTBLK, ENOTBLK, ES("Block device required") }, { BSM_ERRNO_EBUSY, EBUSY, ES("Device busy") }, { BSM_ERRNO_EEXIST, EEXIST, ES("File exists") }, { BSM_ERRNO_EXDEV, EXDEV, ES("Cross-device link") }, { BSM_ERRNO_ENODEV, ENODEV, ES("Operation not supported by device") }, { BSM_ERRNO_ENOTDIR, ENOTDIR, ES("Not a directory") }, { BSM_ERRNO_EISDIR, EISDIR, ES("Is a directory") }, { BSM_ERRNO_EINVAL, EINVAL, ES("Invalid argument") }, { BSM_ERRNO_ENFILE, ENFILE, ES("Too many open files in system") }, { BSM_ERRNO_EMFILE, EMFILE, ES("Too many open files") }, { BSM_ERRNO_ENOTTY, ENOTTY, ES("Inappropriate ioctl for device") }, { BSM_ERRNO_ETXTBSY, ETXTBSY, ES("Text file busy") }, { BSM_ERRNO_EFBIG, EFBIG, ES("File too large") }, { BSM_ERRNO_ENOSPC, ENOSPC, ES("No space left on device") }, { BSM_ERRNO_ESPIPE, ESPIPE, ES("Illegal seek") }, { BSM_ERRNO_EROFS, EROFS, ES("Read-only file system") }, { BSM_ERRNO_EMLINK, EMLINK, ES("Too many links") }, { BSM_ERRNO_EPIPE, EPIPE, ES("Broken pipe") }, { BSM_ERRNO_EDOM, EDOM, ES("Numerical argument out of domain") }, { BSM_ERRNO_ERANGE, ERANGE, ES("Result too large") }, { BSM_ERRNO_ENOMSG, ENOMSG, ES("No message of desired type") }, { BSM_ERRNO_EIDRM, EIDRM, ES("Identifier removed") }, { BSM_ERRNO_ECHRNG, #ifdef ECHRNG ECHRNG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Channel number out of range") }, { BSM_ERRNO_EL2NSYNC, #ifdef EL2NSYNC EL2NSYNC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 2 not synchronized") }, { BSM_ERRNO_EL3HLT, #ifdef EL3HLT EL3HLT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 3 halted") }, { BSM_ERRNO_EL3RST, #ifdef EL3RST EL3RST, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 3 reset") }, { BSM_ERRNO_ELNRNG, #ifdef ELNRNG ELNRNG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Link number out of range") }, { BSM_ERRNO_EUNATCH, #ifdef EUNATCH EUNATCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Protocol driver not attached") }, { BSM_ERRNO_ENOCSI, #ifdef ENOCSI ENOCSI, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No CSI structure available") }, { BSM_ERRNO_EL2HLT, #ifdef EL2HLT EL2HLT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 2 halted") }, { BSM_ERRNO_EDEADLK, EDEADLK, ES("Resource deadlock avoided") }, { BSM_ERRNO_ENOLCK, ENOLCK, ES("No locks available") }, { BSM_ERRNO_ECANCELED, ECANCELED, ES("Operation canceled") }, { BSM_ERRNO_ENOTSUP, ENOTSUP, ES("Operation not supported") }, { BSM_ERRNO_EDQUOT, EDQUOT, ES("Disc quota exceeded") }, { BSM_ERRNO_EBADE, #ifdef EBADE EBADE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid exchange") }, { BSM_ERRNO_EBADR, #ifdef EBADR EBADR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid request descriptor") }, { BSM_ERRNO_EXFULL, #ifdef EXFULL EXFULL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Exchange full") }, { BSM_ERRNO_ENOANO, #ifdef ENOANO ENOANO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No anode") }, { BSM_ERRNO_EBADRQC, #ifdef EBADRQC EBADRQC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid request descriptor") }, { BSM_ERRNO_EBADSLT, #ifdef EBADSLT EBADSLT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid slot") }, { BSM_ERRNO_EDEADLOCK, #ifdef EDEADLOCK EDEADLOCK, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Resource deadlock avoided") }, { BSM_ERRNO_EBFONT, #ifdef EBFONT EBFONT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad font file format") }, { BSM_ERRNO_EOWNERDEAD, #ifdef EOWNERDEAD EOWNERDEAD, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Process died with the lock") }, + { BSM_ERRNO_EINTEGRITY, +#ifdef EINTEGRITY + EINTEGRITY, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Integrity check failed") }, { BSM_ERRNO_ENOTRECOVERABLE, #ifdef ENOTRECOVERABLE ENOTRECOVERABLE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Lock is not recoverable") }, { BSM_ERRNO_ENOSTR, #ifdef ENOSTR ENOSTR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Device not a stream") }, { BSM_ERRNO_ENONET, #ifdef ENONET ENONET, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Machine is not on the network") }, { BSM_ERRNO_ENOPKG, #ifdef ENOPKG ENOPKG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Package not installed") }, { BSM_ERRNO_EREMOTE, EREMOTE, ES("Too many levels of remote in path") }, { BSM_ERRNO_ENOLINK, #ifdef ENOLINK ENOLINK, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Link has been severed") }, { BSM_ERRNO_EADV, #ifdef EADV EADV, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Advertise error") }, { BSM_ERRNO_ESRMNT, #ifdef ESRMNT ESRMNT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("srmount error") }, { BSM_ERRNO_ECOMM, #ifdef ECOMM ECOMM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Communication error on send") }, { BSM_ERRNO_EPROTO, #ifdef EPROTO EPROTO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Protocol error") }, { BSM_ERRNO_ELOCKUNMAPPED, #ifdef ELOCKUNMAPPED ELOCKUNMAPPED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Locked lock was unmapped") }, { BSM_ERRNO_ENOTACTIVE, #ifdef ENOTACTIVE ENOTACTIVE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Facility is not active") }, { BSM_ERRNO_EMULTIHOP, #ifdef EMULTIHOP EMULTIHOP, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Multihop attempted") }, { BSM_ERRNO_EBADMSG, #ifdef EBADMSG EBADMSG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad message") }, { BSM_ERRNO_ENAMETOOLONG, ENAMETOOLONG, ES("File name too long") }, { BSM_ERRNO_EOVERFLOW, EOVERFLOW, ES("Value too large to be stored in data type") }, { BSM_ERRNO_ENOTUNIQ, #ifdef ENOTUNIQ ENOTUNIQ, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Given log name not unique") }, { BSM_ERRNO_EBADFD, #ifdef EBADFD EBADFD, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Given f.d. invalid for this operation") }, { BSM_ERRNO_EREMCHG, #ifdef EREMCHG EREMCHG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Remote address changed") }, { BSM_ERRNO_ELIBACC, #ifdef ELIBACC ELIBACC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Can't access a needed shared lib") }, { BSM_ERRNO_ELIBBAD, #ifdef ELIBBAD ELIBBAD, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Accessing a corrupted shared lib") }, { BSM_ERRNO_ELIBSCN, #ifdef ELIBSCN ELIBSCN, #else ERRNO_NO_LOCAL_MAPPING, #endif ES(".lib section in a.out corrupted") }, { BSM_ERRNO_ELIBMAX, #ifdef ELIBMAX ELIBMAX, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Attempting to link in too many libs") }, { BSM_ERRNO_ELIBEXEC, #ifdef ELIBEXEC ELIBEXEC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Attempting to exec a shared library") }, { BSM_ERRNO_EILSEQ, EILSEQ, ES("Illegal byte sequence") }, { BSM_ERRNO_ENOSYS, ENOSYS, ES("Function not implemented") }, { BSM_ERRNO_ELOOP, ELOOP, ES("Too many levels of symbolic links") }, { BSM_ERRNO_ERESTART, #ifdef ERESTART ERESTART, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Restart syscall") }, { BSM_ERRNO_ESTRPIPE, #ifdef ESTRPIPE ESTRPIPE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("If pipe/FIFO, don't sleep in stream head") }, { BSM_ERRNO_ENOTEMPTY, ENOTEMPTY, ES("Directory not empty") }, { BSM_ERRNO_EUSERS, EUSERS, ES("Too many users") }, { BSM_ERRNO_ENOTSOCK, ENOTSOCK, ES("Socket operation on non-socket") }, { BSM_ERRNO_EDESTADDRREQ, EDESTADDRREQ, ES("Destination address required") }, { BSM_ERRNO_EMSGSIZE, EMSGSIZE, ES("Message too long") }, { BSM_ERRNO_EPROTOTYPE, EPROTOTYPE, ES("Protocol wrong type for socket") }, { BSM_ERRNO_ENOPROTOOPT, ENOPROTOOPT, ES("Protocol not available") }, { BSM_ERRNO_EPROTONOSUPPORT, EPROTONOSUPPORT, ES("Protocol not supported") }, { BSM_ERRNO_ESOCKTNOSUPPORT, ESOCKTNOSUPPORT, ES("Socket type not supported") }, { BSM_ERRNO_EOPNOTSUPP, EOPNOTSUPP, ES("Operation not supported") }, { BSM_ERRNO_EPFNOSUPPORT, EPFNOSUPPORT, ES("Protocol family not supported") }, { BSM_ERRNO_EAFNOSUPPORT, EAFNOSUPPORT, ES("Address family not supported by protocol family") }, { BSM_ERRNO_EADDRINUSE, EADDRINUSE, ES("Address already in use") }, { BSM_ERRNO_EADDRNOTAVAIL, EADDRNOTAVAIL, ES("Can't assign requested address") }, { BSM_ERRNO_ENETDOWN, ENETDOWN, ES("Network is down") }, { BSM_ERRNO_ENETRESET, ENETRESET, ES("Network dropped connection on reset") }, { BSM_ERRNO_ECONNABORTED, ECONNABORTED, ES("Software caused connection abort") }, { BSM_ERRNO_ECONNRESET, ECONNRESET, ES("Connection reset by peer") }, { BSM_ERRNO_ENOBUFS, ENOBUFS, ES("No buffer space available") }, { BSM_ERRNO_EISCONN, EISCONN, ES("Socket is already connected") }, { BSM_ERRNO_ENOTCONN, ENOTCONN, ES("Socket is not connected") }, { BSM_ERRNO_ESHUTDOWN, ESHUTDOWN, ES("Can't send after socket shutdown") }, { BSM_ERRNO_ETOOMANYREFS, ETOOMANYREFS, ES("Too many references: can't splice") }, { BSM_ERRNO_ETIMEDOUT, ETIMEDOUT, ES("Operation timed out") }, { BSM_ERRNO_ECONNREFUSED, ECONNREFUSED, ES("Connection refused") }, { BSM_ERRNO_EHOSTDOWN, EHOSTDOWN, ES("Host is down") }, { BSM_ERRNO_EHOSTUNREACH, EHOSTUNREACH, ES("No route to host") }, { BSM_ERRNO_EALREADY, EALREADY, ES("Operation already in progress") }, { BSM_ERRNO_EINPROGRESS, EINPROGRESS, ES("Operation now in progress") }, { BSM_ERRNO_ESTALE, ESTALE, ES("Stale NFS file handle") }, { BSM_ERRNO_EPROCLIM, #ifdef EPROCLIM EPROCLIM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Too many processes") }, { BSM_ERRNO_EBADRPC, #ifdef EBADRPC EBADRPC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC struct is bad") }, { BSM_ERRNO_ERPCMISMATCH, #ifdef ERPCMISMATCH ERPCMISMATCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC version wrong") }, { BSM_ERRNO_EPROGUNAVAIL, #ifdef EPROGUNAVAIL EPROGUNAVAIL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC prog. not avail") }, { BSM_ERRNO_EPROGMISMATCH, #ifdef EPROGMISMATCH EPROGMISMATCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC version wrong") }, { BSM_ERRNO_EPROCUNAVAIL, #ifdef EPROCUNAVAIL EPROCUNAVAIL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad procedure for program") }, { BSM_ERRNO_EFTYPE, #ifdef EFTYPE EFTYPE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Inappropriate file type or format") }, { BSM_ERRNO_EAUTH, #ifdef EAUTH EAUTH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Authenticateion error") }, { BSM_ERRNO_ENEEDAUTH, #ifdef ENEEDAUTH ENEEDAUTH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Need authenticator") }, { BSM_ERRNO_ENOATTR, #ifdef ENOATTR ENOATTR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Attribute not found") }, { BSM_ERRNO_EDOOFUS, #ifdef EDOOFUS EDOOFUS, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Programming error") }, { BSM_ERRNO_EJUSTRETURN, #ifdef EJUSTRETURN EJUSTRETURN, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Just return") }, { BSM_ERRNO_ENOIOCTL, #ifdef ENOIOCTL ENOIOCTL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("ioctl not handled by this layer") }, { BSM_ERRNO_EDIRIOCTL, #ifdef EDIRIOCTL EDIRIOCTL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("do direct ioctl in GEOM") }, { BSM_ERRNO_EPWROFF, #ifdef EPWROFF EPWROFF, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Device power is off") }, { BSM_ERRNO_EDEVERR, #ifdef EDEVERR EDEVERR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Device error") }, { BSM_ERRNO_EBADEXEC, #ifdef EBADEXEC EBADEXEC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad executable") }, { BSM_ERRNO_EBADARCH, #ifdef EBADARCH EBADARCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad CPU type in executable") }, { BSM_ERRNO_ESHLIBVERS, #ifdef ESHLIBVERS ESHLIBVERS, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Shared library version mismatch") }, { BSM_ERRNO_EBADMACHO, #ifdef EBADMACHO EBADMACHO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Malformed Macho file") }, { BSM_ERRNO_EPOLICY, #ifdef EPOLICY EPOLICY, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Operation failed by policy") }, { BSM_ERRNO_EDOTDOT, #ifdef EDOTDOT EDOTDOT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RFS specific error") }, { BSM_ERRNO_EUCLEAN, #ifdef EUCLEAN EUCLEAN, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Structure needs cleaning") }, { BSM_ERRNO_ENOTNAM, #ifdef ENOTNAM ENOTNAM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Not a XENIX named type file") }, { BSM_ERRNO_ENAVAIL, #ifdef ENAVAIL ENAVAIL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No XENIX semaphores available") }, { BSM_ERRNO_EISNAM, #ifdef EISNAM EISNAM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Is a named type file") }, { BSM_ERRNO_EREMOTEIO, #ifdef EREMOTEIO EREMOTEIO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Remote I/O error") }, { BSM_ERRNO_ENOMEDIUM, #ifdef ENOMEDIUM ENOMEDIUM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No medium found") }, { BSM_ERRNO_EMEDIUMTYPE, #ifdef EMEDIUMTYPE EMEDIUMTYPE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Wrong medium type") }, { BSM_ERRNO_ENOKEY, #ifdef ENOKEY ENOKEY, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Required key not available") }, { BSM_ERRNO_EKEYEXPIRED, #ifdef EKEYEXPIRED EKEYEXPIRED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Key has expired") }, { BSM_ERRNO_EKEYREVOKED, #ifdef EKEYREVOKED EKEYREVOKED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Key has been revoked") }, { BSM_ERRNO_EKEYREJECTED, #ifdef EKEYREJECTED EKEYREJECTED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Key was rejected by service") }, { BSM_ERRNO_ENOTCAPABLE, #ifdef ENOTCAPABLE ENOTCAPABLE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Capabilities insufficient") }, { BSM_ERRNO_ECAPMODE, #ifdef ECAPMODE ECAPMODE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Not permitted in capability mode") }, }; static const int bsm_errnos_count = sizeof(bsm_errnos) / sizeof(bsm_errnos[0]); static const struct bsm_errno * bsm_lookup_errno_local(int local_errno) { int i; for (i = 0; i < bsm_errnos_count; i++) { if (bsm_errnos[i].be_local_errno == local_errno) return (&bsm_errnos[i]); } return (NULL); } /* * Conversion to the BSM errno space isn't allowed to fail; we simply map to * BSM_ERRNO_UNKNOWN and let the remote endpoint deal with it. */ u_char au_errno_to_bsm(int local_errno) { const struct bsm_errno *bsme; bsme = bsm_lookup_errno_local(local_errno); if (bsme == NULL) return (BSM_ERRNO_UNKNOWN); return (bsme->be_bsm_errno); } static const struct bsm_errno * bsm_lookup_errno_bsm(u_char bsm_errno) { int i; for (i = 0; i < bsm_errnos_count; i++) { if (bsm_errnos[i].be_bsm_errno == bsm_errno) return (&bsm_errnos[i]); } return (NULL); } /* * Converstion from a BSM error to a local error number may fail if either * OpenBSM doesn't recognize the error on the wire, or because there is no * appropriate local mapping. */ int au_bsm_to_errno(u_char bsm_errno, int *errorp) { const struct bsm_errno *bsme; bsme = bsm_lookup_errno_bsm(bsm_errno); if (bsme == NULL || bsme->be_local_errno == ERRNO_NO_LOCAL_MAPPING) return (-1); *errorp = bsme->be_local_errno; return (0); } #if !defined(KERNEL) && !defined(_KERNEL) const char * au_strerror(u_char bsm_errno) { const struct bsm_errno *bsme; bsme = bsm_lookup_errno_bsm(bsm_errno); if (bsme == NULL) return ("Unrecognized BSM error"); if (bsme->be_local_errno != ERRNO_NO_LOCAL_MAPPING) return (strerror(bsme->be_local_errno)); return (bsme->be_strerror); } #endif Index: head/contrib/openbsm/sys/bsm/audit_errno.h =================================================================== --- head/contrib/openbsm/sys/bsm/audit_errno.h (revision 343110) +++ head/contrib/openbsm/sys/bsm/audit_errno.h (revision 343111) @@ -1,214 +1,215 @@ /*- * Copyright (c) 2008 Apple Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _BSM_AUDIT_ERRNO_H_ #define _BSM_AUDIT_ERRNO_H_ /* * For the purposes of portable encoding, we convert between local error * numbers and Solaris error numbers (as well as some extensions for error * numbers that don't exist in Solaris). Although the first 35 or so * constants are the same across all OS's, we don't handle that in any * special way. * * When adding constants here, also add them to bsm_errno.c. */ #define BSM_ERRNO_ESUCCESS 0 #define BSM_ERRNO_EPERM 1 #define BSM_ERRNO_ENOENT 2 #define BSM_ERRNO_ESRCH 3 #define BSM_ERRNO_EINTR 4 #define BSM_ERRNO_EIO 5 #define BSM_ERRNO_ENXIO 6 #define BSM_ERRNO_E2BIG 7 #define BSM_ERRNO_ENOEXEC 8 #define BSM_ERRNO_EBADF 9 #define BSM_ERRNO_ECHILD 10 #define BSM_ERRNO_EAGAIN 11 #define BSM_ERRNO_ENOMEM 12 #define BSM_ERRNO_EACCES 13 #define BSM_ERRNO_EFAULT 14 #define BSM_ERRNO_ENOTBLK 15 #define BSM_ERRNO_EBUSY 16 #define BSM_ERRNO_EEXIST 17 #define BSM_ERRNO_EXDEV 18 #define BSM_ERRNO_ENODEV 19 #define BSM_ERRNO_ENOTDIR 20 #define BSM_ERRNO_EISDIR 21 #define BSM_ERRNO_EINVAL 22 #define BSM_ERRNO_ENFILE 23 #define BSM_ERRNO_EMFILE 24 #define BSM_ERRNO_ENOTTY 25 #define BSM_ERRNO_ETXTBSY 26 #define BSM_ERRNO_EFBIG 27 #define BSM_ERRNO_ENOSPC 28 #define BSM_ERRNO_ESPIPE 29 #define BSM_ERRNO_EROFS 30 #define BSM_ERRNO_EMLINK 31 #define BSM_ERRNO_EPIPE 32 #define BSM_ERRNO_EDOM 33 #define BSM_ERRNO_ERANGE 34 #define BSM_ERRNO_ENOMSG 35 #define BSM_ERRNO_EIDRM 36 #define BSM_ERRNO_ECHRNG 37 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL2NSYNC 38 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL3HLT 39 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL3RST 40 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELNRNG 41 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EUNATCH 42 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOCSI 43 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL2HLT 44 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EDEADLK 45 #define BSM_ERRNO_ENOLCK 46 #define BSM_ERRNO_ECANCELED 47 #define BSM_ERRNO_ENOTSUP 48 #define BSM_ERRNO_EDQUOT 49 #define BSM_ERRNO_EBADE 50 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADR 51 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EXFULL 52 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOANO 53 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADRQC 54 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADSLT 55 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EDEADLOCK 56 /* Solaris-specific. */ #define BSM_ERRNO_EBFONT 57 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EOWNERDEAD 58 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOTRECOVERABLE 59 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOSTR 60 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ENODATA 61 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ETIME 62 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ENOSR 63 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ENONET 64 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOPKG 65 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EREMOTE 66 #define BSM_ERRNO_ENOLINK 67 #define BSM_ERRNO_EADV 68 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ESRMNT 69 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ECOMM 70 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EPROTO 71 #define BSM_ERRNO_ELOCKUNMAPPED 72 /* Solaris-specific. */ #define BSM_ERRNO_ENOTACTIVE 73 /* Solaris-specific. */ #define BSM_ERRNO_EMULTIHOP 74 #define BSM_ERRNO_EBADMSG 77 #define BSM_ERRNO_ENAMETOOLONG 78 #define BSM_ERRNO_EOVERFLOW 79 #define BSM_ERRNO_ENOTUNIQ 80 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADFD 81 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EREMCHG 82 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBACC 83 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBBAD 84 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBSCN 85 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBMAX 86 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBEXEC 87 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EILSEQ 88 #define BSM_ERRNO_ENOSYS 89 #define BSM_ERRNO_ELOOP 90 #define BSM_ERRNO_ERESTART 91 #define BSM_ERRNO_ESTRPIPE 92 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOTEMPTY 93 #define BSM_ERRNO_EUSERS 94 #define BSM_ERRNO_ENOTSOCK 95 #define BSM_ERRNO_EDESTADDRREQ 96 #define BSM_ERRNO_EMSGSIZE 97 #define BSM_ERRNO_EPROTOTYPE 98 #define BSM_ERRNO_ENOPROTOOPT 99 #define BSM_ERRNO_EPROTONOSUPPORT 120 #define BSM_ERRNO_ESOCKTNOSUPPORT 121 #define BSM_ERRNO_EOPNOTSUPP 122 #define BSM_ERRNO_EPFNOSUPPORT 123 #define BSM_ERRNO_EAFNOSUPPORT 124 #define BSM_ERRNO_EADDRINUSE 125 #define BSM_ERRNO_EADDRNOTAVAIL 126 #define BSM_ERRNO_ENETDOWN 127 #define BSM_ERRNO_ENETUNREACH 128 #define BSM_ERRNO_ENETRESET 129 #define BSM_ERRNO_ECONNABORTED 130 #define BSM_ERRNO_ECONNRESET 131 #define BSM_ERRNO_ENOBUFS 132 #define BSM_ERRNO_EISCONN 133 #define BSM_ERRNO_ENOTCONN 134 #define BSM_ERRNO_ESHUTDOWN 143 #define BSM_ERRNO_ETOOMANYREFS 144 #define BSM_ERRNO_ETIMEDOUT 145 #define BSM_ERRNO_ECONNREFUSED 146 #define BSM_ERRNO_EHOSTDOWN 147 #define BSM_ERRNO_EHOSTUNREACH 148 #define BSM_ERRNO_EALREADY 149 #define BSM_ERRNO_EINPROGRESS 150 #define BSM_ERRNO_ESTALE 151 /* * OpenBSM constants for error numbers not defined in Solaris. In the event * that these errors are added to Solaris, we will deprecate the OpenBSM * numbers in the same way we do for audit event constants. * * ELAST doesn't get a constant in the BSM space. */ #define BSM_ERRNO_EPROCLIM 190 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EBADRPC 191 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_ERPCMISMATCH 192 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EPROGUNAVAIL 193 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EPROGMISMATCH 194 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EPROCUNAVAIL 195 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EFTYPE 196 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EAUTH 197 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_ENEEDAUTH 198 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_ENOATTR 199 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EDOOFUS 200 /* FreeBSD-specific. */ #define BSM_ERRNO_EJUSTRETURN 201 /* FreeBSD-specific. */ #define BSM_ERRNO_ENOIOCTL 202 /* FreeBSD-specific. */ #define BSM_ERRNO_EDIRIOCTL 203 /* FreeBSD-specific. */ #define BSM_ERRNO_EPWROFF 204 /* Darwin-specific. */ #define BSM_ERRNO_EDEVERR 205 /* Darwin-specific. */ #define BSM_ERRNO_EBADEXEC 206 /* Darwin-specific. */ #define BSM_ERRNO_EBADARCH 207 /* Darwin-specific. */ #define BSM_ERRNO_ESHLIBVERS 208 /* Darwin-specific. */ #define BSM_ERRNO_EBADMACHO 209 /* Darwin-specific. */ #define BSM_ERRNO_EPOLICY 210 /* Darwin-specific. */ #define BSM_ERRNO_EDOTDOT 211 /* Linux-specific. */ #define BSM_ERRNO_EUCLEAN 212 /* Linux-specific. */ #define BSM_ERRNO_ENOTNAM 213 /* Linux(Xenix?)-specific. */ #define BSM_ERRNO_ENAVAIL 214 /* Linux(Xenix?)-specific. */ #define BSM_ERRNO_EISNAM 215 /* Linux(Xenix?)-specific. */ #define BSM_ERRNO_EREMOTEIO 216 /* Linux-specific. */ #define BSM_ERRNO_ENOMEDIUM 217 /* Linux-specific. */ #define BSM_ERRNO_EMEDIUMTYPE 218 /* Linux-specific. */ #define BSM_ERRNO_ENOKEY 219 /* Linux-specific. */ #define BSM_ERRNO_EKEYEXPIRED 220 /* Linux-specific. */ #define BSM_ERRNO_EKEYREVOKED 221 /* Linux-specific. */ #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. */ #define BSM_ERRNO_ENOTCAPABLE 223 /* FreeBSD-specific. */ #define BSM_ERRNO_ECAPMODE 224 /* FreeBSD-specific. */ +#define BSM_ERRNO_EINTEGRITY 225 /* FreeBSD-specific. */ /* * In the event that OpenBSM doesn't have a file representation of a local * error number, use this. */ #define BSM_ERRNO_UNKNOWN 250 /* OpenBSM-specific. */ #endif /* !_BSM_AUDIT_ERRNO_H_ */ Index: head/lib/libc/gen/errlst.c =================================================================== --- head/lib/libc/gen/errlst.c (revision 343110) +++ head/lib/libc/gen/errlst.c (revision 343111) @@ -1,226 +1,226 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1985, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __SCCSID("@(#)errlst.c 8.2 (Berkeley) 11/16/93"); __FBSDID("$FreeBSD$"); #include #include #include "errlst.h" const char __uprefix[] = "Unknown error"; const char *const sys_errlist[] = { "No error: 0", /* 0 - ENOERROR */ "Operation not permitted", /* 1 - EPERM */ "No such file or directory", /* 2 - ENOENT */ "No such process", /* 3 - ESRCH */ "Interrupted system call", /* 4 - EINTR */ "Input/output error", /* 5 - EIO */ "Device not configured", /* 6 - ENXIO */ "Argument list too long", /* 7 - E2BIG */ "Exec format error", /* 8 - ENOEXEC */ "Bad file descriptor", /* 9 - EBADF */ "No child processes", /* 10 - ECHILD */ "Resource deadlock avoided", /* 11 - EDEADLK */ "Cannot allocate memory", /* 12 - ENOMEM */ "Permission denied", /* 13 - EACCES */ "Bad address", /* 14 - EFAULT */ "Block device required", /* 15 - ENOTBLK */ "Device busy", /* 16 - EBUSY */ "File exists", /* 17 - EEXIST */ "Cross-device link", /* 18 - EXDEV */ "Operation not supported by device", /* 19 - ENODEV */ "Not a directory", /* 20 - ENOTDIR */ "Is a directory", /* 21 - EISDIR */ "Invalid argument", /* 22 - EINVAL */ "Too many open files in system", /* 23 - ENFILE */ "Too many open files", /* 24 - EMFILE */ "Inappropriate ioctl for device", /* 25 - ENOTTY */ "Text file busy", /* 26 - ETXTBSY */ "File too large", /* 27 - EFBIG */ "No space left on device", /* 28 - ENOSPC */ "Illegal seek", /* 29 - ESPIPE */ "Read-only file system", /* 30 - EROFS */ "Too many links", /* 31 - EMLINK */ "Broken pipe", /* 32 - EPIPE */ /* math software */ "Numerical argument out of domain", /* 33 - EDOM */ "Result too large", /* 34 - ERANGE */ /* non-blocking and interrupt i/o */ "Resource temporarily unavailable", /* 35 - EAGAIN */ /* 35 - EWOULDBLOCK */ "Operation now in progress", /* 36 - EINPROGRESS */ "Operation already in progress", /* 37 - EALREADY */ /* ipc/network software -- argument errors */ "Socket operation on non-socket", /* 38 - ENOTSOCK */ "Destination address required", /* 39 - EDESTADDRREQ */ "Message too long", /* 40 - EMSGSIZE */ "Protocol wrong type for socket", /* 41 - EPROTOTYPE */ "Protocol not available", /* 42 - ENOPROTOOPT */ "Protocol not supported", /* 43 - EPROTONOSUPPORT */ "Socket type not supported", /* 44 - ESOCKTNOSUPPORT */ "Operation not supported", /* 45 - EOPNOTSUPP */ "Protocol family not supported", /* 46 - EPFNOSUPPORT */ /* 47 - EAFNOSUPPORT */ "Address family not supported by protocol family", "Address already in use", /* 48 - EADDRINUSE */ "Can't assign requested address", /* 49 - EADDRNOTAVAIL */ /* ipc/network software -- operational errors */ "Network is down", /* 50 - ENETDOWN */ "Network is unreachable", /* 51 - ENETUNREACH */ "Network dropped connection on reset", /* 52 - ENETRESET */ "Software caused connection abort", /* 53 - ECONNABORTED */ "Connection reset by peer", /* 54 - ECONNRESET */ "No buffer space available", /* 55 - ENOBUFS */ "Socket is already connected", /* 56 - EISCONN */ "Socket is not connected", /* 57 - ENOTCONN */ "Can't send after socket shutdown", /* 58 - ESHUTDOWN */ "Too many references: can't splice", /* 59 - ETOOMANYREFS */ "Operation timed out", /* 60 - ETIMEDOUT */ "Connection refused", /* 61 - ECONNREFUSED */ "Too many levels of symbolic links", /* 62 - ELOOP */ "File name too long", /* 63 - ENAMETOOLONG */ /* should be rearranged */ "Host is down", /* 64 - EHOSTDOWN */ "No route to host", /* 65 - EHOSTUNREACH */ "Directory not empty", /* 66 - ENOTEMPTY */ /* quotas & mush */ "Too many processes", /* 67 - EPROCLIM */ "Too many users", /* 68 - EUSERS */ "Disc quota exceeded", /* 69 - EDQUOT */ /* Network File System */ "Stale NFS file handle", /* 70 - ESTALE */ "Too many levels of remote in path", /* 71 - EREMOTE */ "RPC struct is bad", /* 72 - EBADRPC */ "RPC version wrong", /* 73 - ERPCMISMATCH */ "RPC prog. not avail", /* 74 - EPROGUNAVAIL */ "Program version wrong", /* 75 - EPROGMISMATCH */ "Bad procedure for program", /* 76 - EPROCUNAVAIL */ "No locks available", /* 77 - ENOLCK */ "Function not implemented", /* 78 - ENOSYS */ "Inappropriate file type or format", /* 79 - EFTYPE */ "Authentication error", /* 80 - EAUTH */ "Need authenticator", /* 81 - ENEEDAUTH */ "Identifier removed", /* 82 - EIDRM */ "No message of desired type", /* 83 - ENOMSG */ "Value too large to be stored in data type", /* 84 - EOVERFLOW */ "Operation canceled", /* 85 - ECANCELED */ "Illegal byte sequence", /* 86 - EILSEQ */ "Attribute not found", /* 87 - ENOATTR */ /* General */ "Programming error", /* 88 - EDOOFUS */ "Bad message", /* 89 - EBADMSG */ "Multihop attempted", /* 90 - EMULTIHOP */ "Link has been severed", /* 91 - ENOLINK */ "Protocol error", /* 92 - EPROTO */ "Capabilities insufficient", /* 93 - ENOTCAPABLE */ "Not permitted in capability mode", /* 94 - ECAPMODE */ "State not recoverable", /* 95 - ENOTRECOVERABLE */ "Previous owner died", /* 96 - EOWNERDEAD */ + "Integrity check failed", /* 97 - EINTEGRITY */ /* * Reserved space in sys_errlist, take the next slot for a next error code. * Reserve prevents the array size from changing for some time. */ - __uprefix, /* 97 */ __uprefix, /* 98 */ __uprefix, /* 99 */ __uprefix, /* 100 */ __uprefix, /* 101 */ __uprefix, /* 102 */ __uprefix, /* 103 */ __uprefix, /* 104 */ __uprefix, /* 105 */ __uprefix, /* 106 */ __uprefix, /* 107 */ __uprefix, /* 108 */ __uprefix, /* 109 */ __uprefix, /* 110 */ __uprefix, /* 111 */ __uprefix, /* 112 */ __uprefix, /* 113 */ __uprefix, /* 114 */ __uprefix, /* 115 */ __uprefix, /* 116 */ __uprefix, /* 117 */ __uprefix, /* 118 */ __uprefix, /* 119 */ __uprefix, /* 120 */ __uprefix, /* 121 */ __uprefix, /* 122 */ __uprefix, /* 123 */ __uprefix, /* 124 */ __uprefix, /* 125 */ __uprefix, /* 126 */ __uprefix, /* 127 */ __uprefix, /* 128 */ __uprefix, /* 129 */ __uprefix, /* 130 */ __uprefix, /* 131 */ __uprefix, /* 132 */ __uprefix, /* 133 */ __uprefix, /* 134 */ __uprefix, /* 135 */ __uprefix, /* 136 */ __uprefix, /* 137 */ __uprefix, /* 138 */ __uprefix, /* 139 */ __uprefix, /* 140 */ __uprefix, /* 141 */ __uprefix, /* 142 */ __uprefix, /* 143 */ __uprefix, /* 144 */ __uprefix, /* 145 */ __uprefix, /* 146 */ __uprefix, /* 147 */ __uprefix, /* 148 */ __uprefix, /* 149 */ __uprefix, /* 150 */ }; const int sys_nerr = ELAST + 1; #ifdef PIC __strong_reference(sys_errlist, __hidden_sys_errlist); __strong_reference(sys_nerr, __hidden_sys_nerr); #endif Index: head/lib/libc/nls/C.msg =================================================================== --- head/lib/libc/nls/C.msg (revision 343110) +++ head/lib/libc/nls/C.msg (revision 343111) @@ -1,301 +1,303 @@ $ $FreeBSD$ $ $ Message catalog for C locale (template) $ $ strerror() support catalog $ $set 1 $ EPERM 1 Operation not permitted $ ENOENT 2 No such file or directory $ ESRCH 3 No such process $ EINTR 4 Interrupted system call $ EIO 5 Input/output error $ ENXIO 6 Device not configured $ E2BIG 7 Argument list too long $ ENOEXEC 8 Exec format error $ EBADF 9 Bad file descriptor $ ECHILD 10 No child processes $ EDEADLK 11 Resource deadlock avoided $ ENOMEM 12 Cannot allocate memory $ EACCES 13 Permission denied $ EFAULT 14 Bad address $ ENOTBLK 15 Block device required $ EBUSY 16 Device busy $ EEXIST 17 File exists $ EXDEV 18 Cross-device link $ ENODEV 19 Operation not supported by device $ ENOTDIR 20 Not a directory $ EISDIR 21 Is a directory $ EINVAL 22 Invalid argument $ ENFILE 23 Too many open files in system $ EMFILE 24 Too many open files $ ENOTTY 25 Inappropriate ioctl for device $ ETXTBSY 26 Text file busy $ EFBIG 27 File too large $ ENOSPC 28 No space left on device $ ESPIPE 29 Illegal seek $ EROFS 30 Read-only file system $ EMLINK 31 Too many links $ EPIPE 32 Broken pipe $ EDOM 33 Numerical argument out of domain $ ERANGE 34 Result too large $ EAGAIN, EWOULDBLOCK 35 Resource temporarily unavailable $ EINPROGRESS 36 Operation now in progress $ EALREADY 37 Operation already in progress $ ENOTSOCK 38 Socket operation on non-socket $ EDESTADDRREQ 39 Destination address required $ EMSGSIZE 40 Message too long $ EPROTOTYPE 41 Protocol wrong type for socket $ ENOPROTOOPT 42 Protocol not available $ EPROTONOSUPPORT 43 Protocol not supported $ ESOCKTNOSUPPORT 44 Socket type not supported $ EOPNOTSUPP 45 Operation not supported $ EPFNOSUPPORT 46 Protocol family not supported $ EAFNOSUPPORT 47 Address family not supported by protocol family $ EADDRINUSE 48 Address already in use $ EADDRNOTAVAIL 49 Can't assign requested address $ ENETDOWN 50 Network is down $ ENETUNREACH 51 Network is unreachable $ ENETRESET 52 Network dropped connection on reset $ ECONNABORTED 53 Software caused connection abort $ ECONNRESET 54 Connection reset by peer $ ENOBUFS 55 No buffer space available $ EISCONN 56 Socket is already connected $ ENOTCONN 57 Socket is not connected $ ESHUTDOWN 58 Can't send after socket shutdown $ ETOOMANYREFS 59 Too many references: can't splice $ ETIMEDOUT 60 Operation timed out $ ECONNREFUSED 61 Connection refused $ ELOOP 62 Too many levels of symbolic links $ ENAMETOOLONG 63 File name too long $ EHOSTDOWN 64 Host is down $ EHOSTUNREACH 65 No route to host $ ENOTEMPTY 66 Directory not empty $ EPROCLIM 67 Too many processes $ EUSERS 68 Too many users $ EDQUOT 69 Disc quota exceeded $ ESTALE 70 Stale NFS file handle $ EREMOTE 71 Too many levels of remote in path $ EBADRPC 72 RPC struct is bad $ ERPCMISMATCH 73 RPC version wrong $ EPROGUNAVAIL 74 RPC prog. not avail $ EPROGMISMATCH 75 Program version wrong $ EPROCUNAVAIL 76 Bad procedure for program $ ENOLCK 77 No locks available $ ENOSYS 78 Function not implemented $ EFTYPE 79 Inappropriate file type or format $ EAUTH 80 Authentication error $ ENEEDAUTH 81 Need authenticator $ EIDRM 82 Identifier removed $ ENOMSG 83 No message of desired type $ EOVERFLOW 84 Value too large to be stored in data type $ ECANCELED 85 Operation canceled $ EILSEQ 86 Illegal byte sequence $ ENOATTR 87 Attribute not found $ EDOOFUS 88 Programming error $ EBADMSG 89 Bad message $ EMULTIHOP 90 Multihop attempted $ ENOLINK 91 Link has been severed $ EPROTO 92 Protocol error $ ENOTCAPABLE 93 Capabilities insufficient $ ECAPMODE 94 Not permitted in capability mode $ ENOTRECOVERABLE 95 State not recoverable $ EOWNERDEAD 96 Previous owner died +$ EINTEGRITY +97 Integrity check failed $ $ strsignal() support catalog $ $set 2 $ SIGHUP 1 Hangup $ SIGINT 2 Interrupt $ SIGQUIT 3 Quit $ SIGILL 4 Illegal instruction $ SIGTRAP 5 Trace/BPT trap $ SIGABRT 6 Abort trap $ SIGEMT 7 EMT trap $ SIGFPE 8 Floating point exception $ SIGKILL 9 Killed $ SIGBUS 10 Bus error $ SIGSEGV 11 Segmentation fault $ SIGSYS 12 Bad system call $ SIGPIPE 13 Broken pipe $ SIGALRM 14 Alarm clock $ SIGTERM 15 Terminated $ SIGURG 16 Urgent I/O condition $ SIGSTOP 17 Suspended (signal) $ SIGTSTP 18 Suspended $ SIGCONT 19 Continued $ SIGCHLD 20 Child exited $ SIGTTIN 21 Stopped (tty input) $ SIGTTOU 22 Stopped (tty output) $ SIGIO 23 I/O possible $ SIGXCPU 24 Cputime limit exceeded $ SIGXFSZ 25 Filesize limit exceeded $ SIGVTALRM 26 Virtual timer expired $ SIGPROF 27 Profiling timer expired $ SIGWINCH 28 Window size changes $ SIGINFO 29 Information request $ SIGUSR1 30 User defined signal 1 $ SIGUSR2 31 User defined signal 2 $ $ gai_strerror() support catalog $ $set 3 $ 1 (obsolete) 1 Address family for hostname not supported $ EAI_AGAIN 2 Temporary failure in name resolution $ EAI_BADFLAGS 3 Invalid value for ai_flags $ EAI_FAIL 4 Non-recoverable failure in name resolution $ EAI_FAMILY 5 ai_family not supported $ EAI_MEMORY 6 Memory allocation failure $ 7 (obsolete) 7 No address associated with hostname $ EAI_NONAME 8 hostname nor servname provided, or not known $ EAI_SERVICE 9 servname not supported for ai_socktype $ EAI_SOCKTYPE 10 ai_socktype not supported $ EAI_SYSTEM 11 System error returned in errno $ EAI_BADHINTS 12 Invalid value for hints $ EAI_PROTOCOL 13 Resolved protocol is unknown $ EAI_OVERFLOW 14 Argument buffer overflow $ 0 32766 Success $ NL_MSGMAX 32767 Unknown error Index: head/lib/libc/sys/intro.2 =================================================================== --- head/lib/libc/sys/intro.2 (revision 343110) +++ head/lib/libc/sys/intro.2 (revision 343111) @@ -1,754 +1,768 @@ .\" Copyright (c) 1980, 1983, 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)intro.2 8.5 (Berkeley) 2/27/95 .\" $FreeBSD$ .\" .Dd September 8, 2016 .Dt INTRO 2 .Os .Sh NAME .Nm intro .Nd introduction to system calls and error numbers .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In errno.h .Sh DESCRIPTION This section provides an overview of the system calls, their error returns, and other common definitions and concepts. .\".Pp .\".Sy System call restart .\".Pp .\"(more later...) .Sh RETURN VALUES Nearly all of the system calls provide an error number referenced via the external identifier errno. This identifier is defined in .In sys/errno.h as .Pp .Dl extern int * __error(); .Dl #define errno (* __error()) .Pp The .Va __error() function returns a pointer to a field in the thread specific structure for threads other than the initial thread. For the initial thread and non-threaded processes, .Va __error() returns a pointer to a global .Va errno variable that is compatible with the previous definition. .Pp When a system call detects an error, it returns an integer value indicating failure (usually -1) and sets the variable .Va errno accordingly. (This allows interpretation of the failure on receiving a -1 and to take action accordingly.) Successful calls never set .Va errno ; once set, it remains until another error occurs. It should only be examined after an error. Note that a number of system calls overload the meanings of these error numbers, and that the meanings must be interpreted according to the type and circumstances of the call. .Pp The following is a complete list of the errors and their names as given in .In sys/errno.h . .Bl -hang -width Ds .It Er 0 Em "Undefined error: 0" . Not used. .It Er 1 EPERM Em "Operation not permitted" . An attempt was made to perform an operation limited to processes with appropriate privileges or to the owner of a file or other resources. .It Er 2 ENOENT Em "No such file or directory" . A component of a specified pathname did not exist, or the pathname was an empty string. .It Er 3 ESRCH Em "No such process" . No process could be found corresponding to that specified by the given process ID. .It Er 4 EINTR Em "Interrupted system call" . An asynchronous signal (such as .Dv SIGINT or .Dv SIGQUIT ) was caught by the process during the execution of an interruptible function. If the signal handler performs a normal return, the interrupted system call will seem to have returned the error condition. .It Er 5 EIO Em "Input/output error" . Some physical input or output error occurred. This error will not be reported until a subsequent operation on the same file descriptor and may be lost (over written) by any subsequent errors. .It Er 6 ENXIO Em "Device not configured" . Input or output on a special file referred to a device that did not exist, or made a request beyond the limits of the device. This error may also occur when, for example, a tape drive is not online or no disk pack is loaded on a drive. .It Er 7 E2BIG Em "Argument list too long" . The number of bytes used for the argument and environment list of the new process exceeded the current limit .Dv ( NCARGS in .In sys/param.h ) . .It Er 8 ENOEXEC Em "Exec format error" . A request was made to execute a file that, although it has the appropriate permissions, was not in the format required for an executable file. .It Er 9 EBADF Em "Bad file descriptor" . A file descriptor argument was out of range, referred to no open file, or a read (write) request was made to a file that was only open for writing (reading). .It Er 10 ECHILD Em "\&No child processes" . A .Xr wait 2 or .Xr waitpid 2 function was executed by a process that had no existing or unwaited-for child processes. .It Er 11 EDEADLK Em "Resource deadlock avoided" . An attempt was made to lock a system resource that would have resulted in a deadlock situation. .It Er 12 ENOMEM Em "Cannot allocate memory" . The new process image required more memory than was allowed by the hardware or by system-imposed memory management constraints. A lack of swap space is normally temporary; however, a lack of core is not. Soft limits may be increased to their corresponding hard limits. .It Er 13 EACCES Em "Permission denied" . An attempt was made to access a file in a way forbidden by its file access permissions. .It Er 14 EFAULT Em "Bad address" . The system detected an invalid address in attempting to use an argument of a call. .It Er 15 ENOTBLK Em "Block device required" . A block device operation was attempted on a non-block device or file. .It Er 16 EBUSY Em "Device busy" . An attempt to use a system resource which was in use at the time in a manner which would have conflicted with the request. .It Er 17 EEXIST Em "File exists" . An existing file was mentioned in an inappropriate context, for instance, as the new link name in a .Xr link 2 system call. .It Er 18 EXDEV Em "Cross-device link" . A hard link to a file on another file system was attempted. .It Er 19 ENODEV Em "Operation not supported by device" . An attempt was made to apply an inappropriate function to a device, for example, trying to read a write-only device such as a printer. .It Er 20 ENOTDIR Em "Not a directory" . A component of the specified pathname existed, but it was not a directory, when a directory was expected. .It Er 21 EISDIR Em "Is a directory" . An attempt was made to open a directory with write mode specified. .It Er 22 EINVAL Em "Invalid argument" . Some invalid argument was supplied. (For example, specifying an undefined signal to a .Xr signal 3 function or a .Xr kill 2 system call). .It Er 23 ENFILE Em "Too many open files in system" . Maximum number of open files allowable on the system has been reached and requests for an open cannot be satisfied until at least one has been closed. .It Er 24 EMFILE Em "Too many open files" . Maximum number of file descriptors allowable in the process has been reached and requests for an open cannot be satisfied until at least one has been closed. The .Xr getdtablesize 2 system call will obtain the current limit. .It Er 25 ENOTTY Em "Inappropriate ioctl for device" . A control function (see .Xr ioctl 2 ) was attempted for a file or special device for which the operation was inappropriate. .It Er 26 ETXTBSY Em "Text file busy" . The new process was a pure procedure (shared text) file which was open for writing by another process, or while the pure procedure file was being executed an .Xr open 2 call requested write access. .It Er 27 EFBIG Em "File too large" . The size of a file exceeded the maximum. .It Er 28 ENOSPC Em "No space left on device" . A .Xr write 2 to an ordinary file, the creation of a directory or symbolic link, or the creation of a directory entry failed because no more disk blocks were available on the file system, or the allocation of an inode for a newly created file failed because no more inodes were available on the file system. .It Er 29 ESPIPE Em "Illegal seek" . An .Xr lseek 2 system call was issued on a socket, pipe or .Tn FIFO . .It Er 30 EROFS Em "Read-only file system" . An attempt was made to modify a file or directory on a file system that was read-only at the time. .It Er 31 EMLINK Em "Too many links" . Maximum allowable hard links to a single file has been exceeded (limit of 32767 hard links per file). .It Er 32 EPIPE Em "Broken pipe" . A write on a pipe, socket or .Tn FIFO for which there is no process to read the data. .It Er 33 EDOM Em "Numerical argument out of domain" . A numerical input argument was outside the defined domain of the mathematical function. .It Er 34 ERANGE Em "Result too large" . A numerical result of the function was too large to fit in the available space (perhaps exceeded precision). .It Er 35 EAGAIN Em "Resource temporarily unavailable" . This is a temporary condition and later calls to the same routine may complete normally. .It Er 36 EINPROGRESS Em "Operation now in progress" . An operation that takes a long time to complete (such as a .Xr connect 2 ) was attempted on a non-blocking object (see .Xr fcntl 2 ) . .It Er 37 EALREADY Em "Operation already in progress" . An operation was attempted on a non-blocking object that already had an operation in progress. .It Er 38 ENOTSOCK Em "Socket operation on non-socket" . Self-explanatory. .It Er 39 EDESTADDRREQ Em "Destination address required" . A required address was omitted from an operation on a socket. .It Er 40 EMSGSIZE Em "Message too long" . A message sent on a socket was larger than the internal message buffer or some other network limit. .It Er 41 EPROTOTYPE Em "Protocol wrong type for socket" . A protocol was specified that does not support the semantics of the socket type requested. For example, you cannot use the .Tn ARPA Internet .Tn UDP protocol with type .Dv SOCK_STREAM . .It Er 42 ENOPROTOOPT Em "Protocol not available" . A bad option or level was specified in a .Xr getsockopt 2 or .Xr setsockopt 2 call. .It Er 43 EPROTONOSUPPORT Em "Protocol not supported" . The protocol has not been configured into the system or no implementation for it exists. .It Er 44 ESOCKTNOSUPPORT Em "Socket type not supported" . The support for the socket type has not been configured into the system or no implementation for it exists. .It Er 45 EOPNOTSUPP Em "Operation not supported" . The attempted operation is not supported for the type of object referenced. Usually this occurs when a file descriptor refers to a file or socket that cannot support this operation, for example, trying to .Em accept a connection on a datagram socket. .It Er 46 EPFNOSUPPORT Em "Protocol family not supported" . The protocol family has not been configured into the system or no implementation for it exists. .It Er 47 EAFNOSUPPORT Em "Address family not supported by protocol family" . An address incompatible with the requested protocol was used. For example, you should not necessarily expect to be able to use .Tn NS addresses with .Tn ARPA Internet protocols. .It Er 48 EADDRINUSE Em "Address already in use" . Only one usage of each address is normally permitted. .It Er 49 EADDRNOTAVAIL Em "Can't assign requested address" . Normally results from an attempt to create a socket with an address not on this machine. .It Er 50 ENETDOWN Em "Network is down" . A socket operation encountered a dead network. .It Er 51 ENETUNREACH Em "Network is unreachable" . A socket operation was attempted to an unreachable network. .It Er 52 ENETRESET Em "Network dropped connection on reset" . The host you were connected to crashed and rebooted. .It Er 53 ECONNABORTED Em "Software caused connection abort" . A connection abort was caused internal to your host machine. .It Er 54 ECONNRESET Em "Connection reset by peer" . A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout or a reboot. .It Er 55 ENOBUFS Em "\&No buffer space available" . An operation on a socket or pipe was not performed because the system lacked sufficient buffer space or because a queue was full. .It Er 56 EISCONN Em "Socket is already connected" . A .Xr connect 2 request was made on an already connected socket; or, a .Xr sendto 2 or .Xr sendmsg 2 request on a connected socket specified a destination when already connected. .It Er 57 ENOTCONN Em "Socket is not connected" . An request to send or receive data was disallowed because the socket was not connected and (when sending on a datagram socket) no address was supplied. .It Er 58 ESHUTDOWN Em "Can't send after socket shutdown" . A request to send data was disallowed because the socket had already been shut down with a previous .Xr shutdown 2 call. .It Er 60 ETIMEDOUT Em "Operation timed out" . A .Xr connect 2 or .Xr send 2 request failed because the connected party did not properly respond after a period of time. (The timeout period is dependent on the communication protocol.) .It Er 61 ECONNREFUSED Em "Connection refused" . No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host. .It Er 62 ELOOP Em "Too many levels of symbolic links" . A path name lookup involved more than 32 .Pq Dv MAXSYMLINKS symbolic links. .It Er 63 ENAMETOOLONG Em "File name too long" . A component of a path name exceeded .Brq Dv NAME_MAX characters, or an entire path name exceeded .Brq Dv PATH_MAX characters. (See also the description of .Dv _PC_NO_TRUNC in .Xr pathconf 2 . ) .It Er 64 EHOSTDOWN Em "Host is down" . A socket operation failed because the destination host was down. .It Er 65 EHOSTUNREACH Em "No route to host" . A socket operation was attempted to an unreachable host. .It Er 66 ENOTEMPTY Em "Directory not empty" . A directory with entries other than .Ql .\& and .Ql ..\& was supplied to a remove directory or rename call. .It Er 67 EPROCLIM Em "Too many processes" . .It Er 68 EUSERS Em "Too many users" . The quota system ran out of table entries. .It Er 69 EDQUOT Em "Disc quota exceeded" . A .Xr write 2 to an ordinary file, the creation of a directory or symbolic link, or the creation of a directory entry failed because the user's quota of disk blocks was exhausted, or the allocation of an inode for a newly created file failed because the user's quota of inodes was exhausted. .It Er 70 ESTALE Em "Stale NFS file handle" . An attempt was made to access an open file (on an .Tn NFS file system) which is now unavailable as referenced by the file descriptor. This may indicate the file was deleted on the .Tn NFS server or some other catastrophic event occurred. .It Er 72 EBADRPC Em "RPC struct is bad" . Exchange of .Tn RPC information was unsuccessful. .It Er 73 ERPCMISMATCH Em "RPC version wrong" . The version of .Tn RPC on the remote peer is not compatible with the local version. .It Er 74 EPROGUNAVAIL Em "RPC prog. not avail" . The requested program is not registered on the remote host. .It Er 75 EPROGMISMATCH Em "Program version wrong" . The requested version of the program is not available on the remote host .Pq Tn RPC . .It Er 76 EPROCUNAVAIL Em "Bad procedure for program" . An .Tn RPC call was attempted for a procedure which does not exist in the remote program. .It Er 77 ENOLCK Em "No locks available" . A system-imposed limit on the number of simultaneous file locks was reached. .It Er 78 ENOSYS Em "Function not implemented" . Attempted a system call that is not available on this system. .It Er 79 EFTYPE Em "Inappropriate file type or format" . The file was the wrong type for the operation, or a data file had the wrong format. .It Er 80 EAUTH Em "Authentication error" . Attempted to use an invalid authentication ticket to mount a .Tn NFS file system. .It Er 81 ENEEDAUTH Em "Need authenticator" . An authentication ticket must be obtained before the given .Tn NFS file system may be mounted. .It Er 82 EIDRM Em "Identifier removed" . An IPC identifier was removed while the current process was waiting on it. .It Er 83 ENOMSG Em "No message of desired type" . An IPC message queue does not contain a message of the desired type, or a message catalog does not contain the requested message. .It Er 84 EOVERFLOW Em "Value too large to be stored in data type" . A numerical result of the function was too large to be stored in the caller provided space. .It Er 85 ECANCELED Em "Operation canceled" . The scheduled operation was canceled. .It Er 86 EILSEQ Em "Illegal byte sequence" . While decoding a multibyte character the function came along an invalid or an incomplete sequence of bytes or the given wide character is invalid. .It Er 87 ENOATTR Em "Attribute not found" . The specified extended attribute does not exist. .It Er 88 EDOOFUS Em "Programming error" . A function or API is being abused in a way which could only be detected at run-time. .It Er 89 EBADMSG Em "Bad message" . A corrupted message was detected. .It Er 90 EMULTIHOP Em "Multihop attempted" . This error code is unused, but present for compatibility with other systems. .It Er 91 ENOLINK Em "Link has been severed" . This error code is unused, but present for compatibility with other systems. .It Er 92 EPROTO Em "Protocol error" . A device or socket encountered an unrecoverable protocol error. .It Er 93 ENOTCAPABLE Em "Capabilities insufficient" . An operation on a capability file descriptor requires greater privilege than the capability allows. .It Er 94 ECAPMODE Em "Not permitted in capability mode" . The system call or operation is not permitted for capability mode processes. .It Er 95 ENOTRECOVERABLE Em "State not recoverable" . The state protected by a robust mutex is not recoverable. .It Er 96 EOWNERDEAD Em "Previous owner died" . The owner of a robust mutex terminated while holding the mutex lock. +.It Er 97 EINTEGRITY Em "Integrity check failed" . +An integrity check such as a check-hash or a cross-correlation failed. +The integrity error falls between +.Er EINVAL +that identifies errors in parameters to a system call and +.Er EIO +that identifies errors with the underlying storage media. +It is typically raised by intermediate kernel layers such as a +filesystem or an in-kernel GEOM subsystem when they detect inconsistencies. +Uses include allowing the +.Xr mount 8 +command to return a different exit value to automate the running of +.Xr fsck 8 +during a system boot. .El .Sh DEFINITIONS .Bl -tag -width Ds .It Process ID . Each active process in the system is uniquely identified by a non-negative integer called a process ID. The range of this ID is from 0 to 99999. .It Parent process ID A new process is created by a currently active process (see .Xr fork 2 ) . The parent process ID of a process is initially the process ID of its creator. If the creating process exits, the parent process ID of each child is set to the ID of the calling process's reaper (see .Xr procctl 2 ) , normally .Xr init 8 . .It Process Group Each active process is a member of a process group that is identified by a non-negative integer called the process group ID. This is the process ID of the group leader. This grouping permits the signaling of related processes (see .Xr termios 4 ) and the job control mechanisms of .Xr csh 1 . .It Session A session is a set of one or more process groups. A session is created by a successful call to .Xr setsid 2 , which causes the caller to become the only member of the only process group in the new session. .It Session leader A process that has created a new session by a successful call to .Xr setsid 2 , is known as a session leader. Only a session leader may acquire a terminal as its controlling terminal (see .Xr termios 4 ) . .It Controlling process A session leader with a controlling terminal is a controlling process. .It Controlling terminal A terminal that is associated with a session is known as the controlling terminal for that session and its members. .It "Terminal Process Group ID" A terminal may be acquired by a session leader as its controlling terminal. Once a terminal is associated with a session, any of the process groups within the session may be placed into the foreground by setting the terminal process group ID to the ID of the process group. This facility is used to arbitrate between multiple jobs contending for the same terminal; (see .Xr csh 1 and .Xr tty 4 ) . .It "Orphaned Process Group" A process group is considered to be .Em orphaned if it is not under the control of a job control shell. More precisely, a process group is orphaned when none of its members has a parent process that is in the same session as the group, but is in a different process group. Note that when a process exits, the parent process for its children is normally changed to be .Xr init 8 , which is in a separate session. Not all members of an orphaned process group are necessarily orphaned processes (those whose creating process has exited). The process group of a session leader is orphaned by definition. .It "Real User ID and Real Group ID" Each user on the system is identified by a positive integer termed the real user ID. .Pp Each user is also a member of one or more groups. One of these groups is distinguished from others and used in implementing accounting facilities. The positive integer corresponding to this distinguished group is termed the real group ID. .Pp All processes have a real user ID and real group ID. These are initialized from the equivalent attributes of the process that created it. .It "Effective User Id, Effective Group Id, and Group Access List" Access to system resources is governed by two values: the effective user ID, and the group access list. The first member of the group access list is also known as the effective group ID. (In POSIX.1, the group access list is known as the set of supplementary group IDs, and it is unspecified whether the effective group ID is a member of the list.) .Pp The effective user ID and effective group ID are initially the process's real user ID and real group ID respectively. Either may be modified through execution of a set-user-ID or set-group-ID file (possibly by one its ancestors) (see .Xr execve 2 ) . By convention, the effective group ID (the first member of the group access list) is duplicated, so that the execution of a set-group-ID program does not result in the loss of the original (real) group ID. .Pp The group access list is a set of group IDs used only in determining resource accessibility. Access checks are performed as described below in ``File Access Permissions''. .It "Saved Set User ID and Saved Set Group ID" When a process executes a new file, the effective user ID is set to the owner of the file if the file is set-user-ID, and the effective group ID (first element of the group access list) is set to the group of the file if the file is set-group-ID. The effective user ID of the process is then recorded as the saved set-user-ID, and the effective group ID of the process is recorded as the saved set-group-ID. These values may be used to regain those values as the effective user or group ID after reverting to the real ID (see .Xr setuid 2 ) . (In POSIX.1, the saved set-user-ID and saved set-group-ID are optional, and are used in setuid and setgid, but this does not work as desired for the super-user.) .It Super-user A process is recognized as a .Em super-user process and is granted special privileges if its effective user ID is 0. .It Descriptor An integer assigned by the system when a file is referenced by .Xr open 2 or .Xr dup 2 , or when a socket is created by .Xr pipe 2 , .Xr socket 2 or .Xr socketpair 2 , which uniquely identifies an access path to that file or socket from a given process or any of its children. .It File Name Names consisting of up to .Brq Dv NAME_MAX characters may be used to name an ordinary file, special file, or directory. .Pp These characters may be arbitrary eight-bit values, excluding .Dv NUL .Tn ( ASCII 0) and the .Ql \&/ character (slash, .Tn ASCII 47). .Pp Note that it is generally unwise to use .Ql \&* , .Ql \&? , .Ql \&[ or .Ql \&] as part of file names because of the special meaning attached to these characters by the shell. .It Path Name A path name is a .Dv NUL Ns -terminated character string starting with an optional slash .Ql \&/ , followed by zero or more directory names separated by slashes, optionally followed by a file name. The total length of a path name must be less than .Brq Dv PATH_MAX characters. (On some systems, this limit may be infinite.) .Pp If a path name begins with a slash, the path search begins at the .Em root directory. Otherwise, the search begins from the current working directory. A slash by itself names the root directory. An empty pathname refers to the current directory. .It Directory A directory is a special type of file that contains entries that are references to other files. Directory entries are called links. By convention, a directory contains at least two links, .Ql .\& and .Ql \&.. , referred to as .Em dot and .Em dot-dot respectively. Dot refers to the directory itself and dot-dot refers to its parent directory. .It "Root Directory and Current Working Directory" Each process has associated with it a concept of a root directory and a current working directory for the purpose of resolving path name searches. A process's root directory need not be the root directory of the root file system. .It File Access Permissions Every file in the file system has a set of access permissions. These permissions are used in determining whether a process may perform a requested operation on the file (such as opening a file for writing). Access permissions are established at the time a file is created. They may be changed at some later time through the .Xr chmod 2 call. .Pp File access is broken down according to whether a file may be: read, written, or executed. Directory files use the execute permission to control if the directory may be searched. .Pp File access permissions are interpreted by the system as they apply to three different classes of users: the owner of the file, those users in the file's group, anyone else. Every file has an independent set of access permissions for each of these classes. When an access check is made, the system decides if permission should be granted by checking the access information applicable to the caller. .Pp Read, write, and execute/search permissions on a file are granted to a process if: .Pp The process's effective user ID is that of the super-user. (Note: even the super-user cannot execute a non-executable file.) .Pp The process's effective user ID matches the user ID of the owner of the file and the owner permissions allow the access. .Pp The process's effective user ID does not match the user ID of the owner of the file, and either the process's effective group ID matches the group ID of the file, or the group ID of the file is in the process's group access list, and the group permissions allow the access. .Pp Neither the effective user ID nor effective group ID and group access list of the process match the corresponding user ID and group ID of the file, but the permissions for ``other users'' allow access. .Pp Otherwise, permission is denied. .It Sockets and Address Families A socket is an endpoint for communication between processes. Each socket has queues for sending and receiving data. .Pp Sockets are typed according to their communications properties. These properties include whether messages sent and received at a socket require the name of the partner, whether communication is reliable, the format used in naming message recipients, etc. .Pp Each instance of the system supports some collection of socket types; consult .Xr socket 2 for more information about the types available and their properties. .Pp Each instance of the system supports some number of sets of communications protocols. Each protocol set supports addresses of a certain format. An Address Family is the set of addresses for a specific group of protocols. Each socket has an address chosen from the address family in which the socket was created. .El .Sh SEE ALSO .Xr intro 3 , .Xr perror 3 Index: head/stand/liblua/lerrno.c =================================================================== --- head/stand/liblua/lerrno.c (revision 343110) +++ head/stand/liblua/lerrno.c (revision 343111) @@ -1,180 +1,181 @@ /*- * Copyright (c) 2018 Conrad Meyer * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #define _WANT_KERNEL_ERRNO 1 #include #include #include "lauxlib.h" #include "lerrno.h" #ifndef nitems #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #endif /* * Populated with: * $ egrep "^#define.E" sys/sys/errno.h | \ * awk '{ print "\tENTRY(" $2 ")," }' >> lerrno.c */ #define ENTRY(name) { #name, name } static const struct err_name_number { const char *err_name; int err_num; } errnoconstants[] = { ENTRY(EPERM), ENTRY(ENOENT), ENTRY(ESRCH), ENTRY(EINTR), ENTRY(EIO), ENTRY(ENXIO), ENTRY(E2BIG), ENTRY(ENOEXEC), ENTRY(EBADF), ENTRY(ECHILD), ENTRY(EDEADLK), ENTRY(ENOMEM), ENTRY(EACCES), ENTRY(EFAULT), ENTRY(ENOTBLK), ENTRY(EBUSY), ENTRY(EEXIST), ENTRY(EXDEV), ENTRY(ENODEV), ENTRY(ENOTDIR), ENTRY(EISDIR), ENTRY(EINVAL), ENTRY(ENFILE), ENTRY(EMFILE), ENTRY(ENOTTY), ENTRY(ETXTBSY), ENTRY(EFBIG), ENTRY(ENOSPC), ENTRY(ESPIPE), ENTRY(EROFS), ENTRY(EMLINK), ENTRY(EPIPE), ENTRY(EDOM), ENTRY(ERANGE), ENTRY(EAGAIN), ENTRY(EWOULDBLOCK), ENTRY(EINPROGRESS), ENTRY(EALREADY), ENTRY(ENOTSOCK), ENTRY(EDESTADDRREQ), ENTRY(EMSGSIZE), ENTRY(EPROTOTYPE), ENTRY(ENOPROTOOPT), ENTRY(EPROTONOSUPPORT), ENTRY(ESOCKTNOSUPPORT), ENTRY(EOPNOTSUPP), ENTRY(ENOTSUP), ENTRY(EPFNOSUPPORT), ENTRY(EAFNOSUPPORT), ENTRY(EADDRINUSE), ENTRY(EADDRNOTAVAIL), ENTRY(ENETDOWN), ENTRY(ENETUNREACH), ENTRY(ENETRESET), ENTRY(ECONNABORTED), ENTRY(ECONNRESET), ENTRY(ENOBUFS), ENTRY(EISCONN), ENTRY(ENOTCONN), ENTRY(ESHUTDOWN), ENTRY(ETOOMANYREFS), ENTRY(ETIMEDOUT), ENTRY(ECONNREFUSED), ENTRY(ELOOP), ENTRY(ENAMETOOLONG), ENTRY(EHOSTDOWN), ENTRY(EHOSTUNREACH), ENTRY(ENOTEMPTY), ENTRY(EPROCLIM), ENTRY(EUSERS), ENTRY(EDQUOT), ENTRY(ESTALE), ENTRY(EREMOTE), ENTRY(EBADRPC), ENTRY(ERPCMISMATCH), ENTRY(EPROGUNAVAIL), ENTRY(EPROGMISMATCH), ENTRY(EPROCUNAVAIL), ENTRY(ENOLCK), ENTRY(ENOSYS), ENTRY(EFTYPE), ENTRY(EAUTH), ENTRY(ENEEDAUTH), ENTRY(EIDRM), ENTRY(ENOMSG), ENTRY(EOVERFLOW), ENTRY(ECANCELED), ENTRY(EILSEQ), ENTRY(ENOATTR), ENTRY(EDOOFUS), ENTRY(EBADMSG), ENTRY(EMULTIHOP), ENTRY(ENOLINK), ENTRY(EPROTO), ENTRY(ENOTCAPABLE), ENTRY(ECAPMODE), ENTRY(ENOTRECOVERABLE), ENTRY(EOWNERDEAD), + ENTRY(EINTEGRITY), ENTRY(ELAST), ENTRY(ERESTART), ENTRY(EJUSTRETURN), ENTRY(ENOIOCTL), ENTRY(EDIRIOCTL), ENTRY(ERELOOKUP), }; #undef ENTRY static void lerrno_register(lua_State *L) { size_t i; for (i = 0; i < nitems(errnoconstants); i++) { lua_pushinteger(L, errnoconstants[i].err_num); lua_setfield(L, -2, errnoconstants[i].err_name); } } static const struct luaL_Reg errnolib[] = { /* Extra bogus entry required by luaL_newlib API */ { NULL, NULL }, }; int luaopen_errno(lua_State *L) { luaL_newlib(L, errnolib); lerrno_register(L); return 1; } Index: head/sys/bsm/audit_errno.h =================================================================== --- head/sys/bsm/audit_errno.h (revision 343110) +++ head/sys/bsm/audit_errno.h (revision 343111) @@ -1,218 +1,219 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2008 Apple Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _BSM_AUDIT_ERRNO_H_ #define _BSM_AUDIT_ERRNO_H_ /* * For the purposes of portable encoding, we convert between local error * numbers and Solaris error numbers (as well as some extensions for error * numbers that don't exist in Solaris). Although the first 35 or so * constants are the same across all OS's, we don't handle that in any * special way. * * When adding constants here, also add them to bsm_errno.c. */ #define BSM_ERRNO_ESUCCESS 0 #define BSM_ERRNO_EPERM 1 #define BSM_ERRNO_ENOENT 2 #define BSM_ERRNO_ESRCH 3 #define BSM_ERRNO_EINTR 4 #define BSM_ERRNO_EIO 5 #define BSM_ERRNO_ENXIO 6 #define BSM_ERRNO_E2BIG 7 #define BSM_ERRNO_ENOEXEC 8 #define BSM_ERRNO_EBADF 9 #define BSM_ERRNO_ECHILD 10 #define BSM_ERRNO_EAGAIN 11 #define BSM_ERRNO_ENOMEM 12 #define BSM_ERRNO_EACCES 13 #define BSM_ERRNO_EFAULT 14 #define BSM_ERRNO_ENOTBLK 15 #define BSM_ERRNO_EBUSY 16 #define BSM_ERRNO_EEXIST 17 #define BSM_ERRNO_EXDEV 18 #define BSM_ERRNO_ENODEV 19 #define BSM_ERRNO_ENOTDIR 20 #define BSM_ERRNO_EISDIR 21 #define BSM_ERRNO_EINVAL 22 #define BSM_ERRNO_ENFILE 23 #define BSM_ERRNO_EMFILE 24 #define BSM_ERRNO_ENOTTY 25 #define BSM_ERRNO_ETXTBSY 26 #define BSM_ERRNO_EFBIG 27 #define BSM_ERRNO_ENOSPC 28 #define BSM_ERRNO_ESPIPE 29 #define BSM_ERRNO_EROFS 30 #define BSM_ERRNO_EMLINK 31 #define BSM_ERRNO_EPIPE 32 #define BSM_ERRNO_EDOM 33 #define BSM_ERRNO_ERANGE 34 #define BSM_ERRNO_ENOMSG 35 #define BSM_ERRNO_EIDRM 36 #define BSM_ERRNO_ECHRNG 37 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL2NSYNC 38 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL3HLT 39 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL3RST 40 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELNRNG 41 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EUNATCH 42 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOCSI 43 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EL2HLT 44 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EDEADLK 45 #define BSM_ERRNO_ENOLCK 46 #define BSM_ERRNO_ECANCELED 47 #define BSM_ERRNO_ENOTSUP 48 #define BSM_ERRNO_EDQUOT 49 #define BSM_ERRNO_EBADE 50 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADR 51 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EXFULL 52 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOANO 53 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADRQC 54 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADSLT 55 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EDEADLOCK 56 /* Solaris-specific. */ #define BSM_ERRNO_EBFONT 57 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EOWNERDEAD 58 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOTRECOVERABLE 59 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOSTR 60 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ENODATA 61 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ETIME 62 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ENOSR 63 /* Solaris/Darwin/Linux-specific. */ #define BSM_ERRNO_ENONET 64 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOPKG 65 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EREMOTE 66 #define BSM_ERRNO_ENOLINK 67 #define BSM_ERRNO_EADV 68 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ESRMNT 69 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ECOMM 70 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EPROTO 71 #define BSM_ERRNO_ELOCKUNMAPPED 72 /* Solaris-specific. */ #define BSM_ERRNO_ENOTACTIVE 73 /* Solaris-specific. */ #define BSM_ERRNO_EMULTIHOP 74 #define BSM_ERRNO_EBADMSG 77 #define BSM_ERRNO_ENAMETOOLONG 78 #define BSM_ERRNO_EOVERFLOW 79 #define BSM_ERRNO_ENOTUNIQ 80 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EBADFD 81 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EREMCHG 82 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBACC 83 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBBAD 84 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBSCN 85 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBMAX 86 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ELIBEXEC 87 /* Solaris/Linux-specific. */ #define BSM_ERRNO_EILSEQ 88 #define BSM_ERRNO_ENOSYS 89 #define BSM_ERRNO_ELOOP 90 #define BSM_ERRNO_ERESTART 91 #define BSM_ERRNO_ESTRPIPE 92 /* Solaris/Linux-specific. */ #define BSM_ERRNO_ENOTEMPTY 93 #define BSM_ERRNO_EUSERS 94 #define BSM_ERRNO_ENOTSOCK 95 #define BSM_ERRNO_EDESTADDRREQ 96 #define BSM_ERRNO_EMSGSIZE 97 #define BSM_ERRNO_EPROTOTYPE 98 #define BSM_ERRNO_ENOPROTOOPT 99 #define BSM_ERRNO_EPROTONOSUPPORT 120 #define BSM_ERRNO_ESOCKTNOSUPPORT 121 #define BSM_ERRNO_EOPNOTSUPP 122 #define BSM_ERRNO_EPFNOSUPPORT 123 #define BSM_ERRNO_EAFNOSUPPORT 124 #define BSM_ERRNO_EADDRINUSE 125 #define BSM_ERRNO_EADDRNOTAVAIL 126 #define BSM_ERRNO_ENETDOWN 127 #define BSM_ERRNO_ENETUNREACH 128 #define BSM_ERRNO_ENETRESET 129 #define BSM_ERRNO_ECONNABORTED 130 #define BSM_ERRNO_ECONNRESET 131 #define BSM_ERRNO_ENOBUFS 132 #define BSM_ERRNO_EISCONN 133 #define BSM_ERRNO_ENOTCONN 134 #define BSM_ERRNO_ESHUTDOWN 143 #define BSM_ERRNO_ETOOMANYREFS 144 #define BSM_ERRNO_ETIMEDOUT 145 #define BSM_ERRNO_ECONNREFUSED 146 #define BSM_ERRNO_EHOSTDOWN 147 #define BSM_ERRNO_EHOSTUNREACH 148 #define BSM_ERRNO_EALREADY 149 #define BSM_ERRNO_EINPROGRESS 150 #define BSM_ERRNO_ESTALE 151 /* * OpenBSM constants for error numbers not defined in Solaris. In the event * that these errors are added to Solaris, we will deprecate the OpenBSM * numbers in the same way we do for audit event constants. * * ELAST doesn't get a constant in the BSM space. */ #define BSM_ERRNO_EPROCLIM 190 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EBADRPC 191 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_ERPCMISMATCH 192 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EPROGUNAVAIL 193 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EPROGMISMATCH 194 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EPROCUNAVAIL 195 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EFTYPE 196 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EAUTH 197 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_ENEEDAUTH 198 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_ENOATTR 199 /* FreeBSD/Darwin-specific. */ #define BSM_ERRNO_EDOOFUS 200 /* FreeBSD-specific. */ #define BSM_ERRNO_EJUSTRETURN 201 /* FreeBSD-specific. */ #define BSM_ERRNO_ENOIOCTL 202 /* FreeBSD-specific. */ #define BSM_ERRNO_EDIRIOCTL 203 /* FreeBSD-specific. */ #define BSM_ERRNO_EPWROFF 204 /* Darwin-specific. */ #define BSM_ERRNO_EDEVERR 205 /* Darwin-specific. */ #define BSM_ERRNO_EBADEXEC 206 /* Darwin-specific. */ #define BSM_ERRNO_EBADARCH 207 /* Darwin-specific. */ #define BSM_ERRNO_ESHLIBVERS 208 /* Darwin-specific. */ #define BSM_ERRNO_EBADMACHO 209 /* Darwin-specific. */ #define BSM_ERRNO_EPOLICY 210 /* Darwin-specific. */ #define BSM_ERRNO_EDOTDOT 211 /* Linux-specific. */ #define BSM_ERRNO_EUCLEAN 212 /* Linux-specific. */ #define BSM_ERRNO_ENOTNAM 213 /* Linux(Xenix?)-specific. */ #define BSM_ERRNO_ENAVAIL 214 /* Linux(Xenix?)-specific. */ #define BSM_ERRNO_EISNAM 215 /* Linux(Xenix?)-specific. */ #define BSM_ERRNO_EREMOTEIO 216 /* Linux-specific. */ #define BSM_ERRNO_ENOMEDIUM 217 /* Linux-specific. */ #define BSM_ERRNO_EMEDIUMTYPE 218 /* Linux-specific. */ #define BSM_ERRNO_ENOKEY 219 /* Linux-specific. */ #define BSM_ERRNO_EKEYEXPIRED 220 /* Linux-specific. */ #define BSM_ERRNO_EKEYREVOKED 221 /* Linux-specific. */ #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. */ #define BSM_ERRNO_ENOTCAPABLE 223 /* FreeBSD-specific. */ #define BSM_ERRNO_ECAPMODE 224 /* FreeBSD-specific. */ +#define BSM_ERRNO_EINTEGRITY 225 /* FreeBSD-specific. */ /* * In the event that OpenBSM doesn't have a file representation of a local * error number, use this. */ #define BSM_ERRNO_UNKNOWN 250 /* OpenBSM-specific. */ #endif /* !_BSM_AUDIT_ERRNO_H_ */ Index: head/sys/compat/cloudabi/cloudabi_errno.c =================================================================== --- head/sys/compat/cloudabi/cloudabi_errno.c (revision 343110) +++ head/sys/compat/cloudabi/cloudabi_errno.c (revision 343111) @@ -1,122 +1,123 @@ /*- * Copyright (c) 2015 Nuxi, https://nuxi.nl/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include /* Converts a FreeBSD errno to a CloudABI errno. */ cloudabi_errno_t cloudabi_convert_errno(int error) { static const int table[] = { [E2BIG] = CLOUDABI_E2BIG, [EACCES] = CLOUDABI_EACCES, [EADDRINUSE] = CLOUDABI_EADDRINUSE, [EADDRNOTAVAIL] = CLOUDABI_EADDRNOTAVAIL, [EAFNOSUPPORT] = CLOUDABI_EAFNOSUPPORT, [EAGAIN] = CLOUDABI_EAGAIN, [EALREADY] = CLOUDABI_EALREADY, [EBADF] = CLOUDABI_EBADF, [EBADMSG] = CLOUDABI_EBADMSG, [EBUSY] = CLOUDABI_EBUSY, [ECANCELED] = CLOUDABI_ECANCELED, [ECHILD] = CLOUDABI_ECHILD, [ECONNABORTED] = CLOUDABI_ECONNABORTED, [ECONNREFUSED] = CLOUDABI_ECONNREFUSED, [ECONNRESET] = CLOUDABI_ECONNRESET, [EDEADLK] = CLOUDABI_EDEADLK, [EDESTADDRREQ] = CLOUDABI_EDESTADDRREQ, [EDOM] = CLOUDABI_EDOM, [EDQUOT] = CLOUDABI_EDQUOT, [EEXIST] = CLOUDABI_EEXIST, [EFAULT] = CLOUDABI_EFAULT, [EFBIG] = CLOUDABI_EFBIG, [EHOSTUNREACH] = CLOUDABI_EHOSTUNREACH, [EIDRM] = CLOUDABI_EIDRM, [EILSEQ] = CLOUDABI_EILSEQ, [EINPROGRESS] = CLOUDABI_EINPROGRESS, + [EINTEGRITY] = CLOUDABI_EINVAL, [EINTR] = CLOUDABI_EINTR, [EINVAL] = CLOUDABI_EINVAL, [EIO] = CLOUDABI_EIO, [EISCONN] = CLOUDABI_EISCONN, [EISDIR] = CLOUDABI_EISDIR, [ELOOP] = CLOUDABI_ELOOP, [EMFILE] = CLOUDABI_EMFILE, [EMLINK] = CLOUDABI_EMLINK, [EMSGSIZE] = CLOUDABI_EMSGSIZE, [EMULTIHOP] = CLOUDABI_EMULTIHOP, [ENAMETOOLONG] = CLOUDABI_ENAMETOOLONG, [ENETDOWN] = CLOUDABI_ENETDOWN, [ENETRESET] = CLOUDABI_ENETRESET, [ENETUNREACH] = CLOUDABI_ENETUNREACH, [ENFILE] = CLOUDABI_ENFILE, [ENOBUFS] = CLOUDABI_ENOBUFS, [ENODEV] = CLOUDABI_ENODEV, [ENOENT] = CLOUDABI_ENOENT, [ENOEXEC] = CLOUDABI_ENOEXEC, [ENOLCK] = CLOUDABI_ENOLCK, [ENOLINK] = CLOUDABI_ENOLINK, [ENOMEM] = CLOUDABI_ENOMEM, [ENOMSG] = CLOUDABI_ENOMSG, [ENOPROTOOPT] = CLOUDABI_ENOPROTOOPT, [ENOSPC] = CLOUDABI_ENOSPC, [ENOSYS] = CLOUDABI_ENOSYS, [ENOTCONN] = CLOUDABI_ENOTCONN, [ENOTDIR] = CLOUDABI_ENOTDIR, [ENOTEMPTY] = CLOUDABI_ENOTEMPTY, [ENOTRECOVERABLE] = CLOUDABI_ENOTRECOVERABLE, [ENOTSOCK] = CLOUDABI_ENOTSOCK, [ENOTSUP] = CLOUDABI_ENOTSUP, [ENOTTY] = CLOUDABI_ENOTTY, [ENXIO] = CLOUDABI_ENXIO, [EOVERFLOW] = CLOUDABI_EOVERFLOW, [EOWNERDEAD] = CLOUDABI_EOWNERDEAD, [EPERM] = CLOUDABI_EPERM, [EPIPE] = CLOUDABI_EPIPE, [EPROTO] = CLOUDABI_EPROTO, [EPROTONOSUPPORT] = CLOUDABI_EPROTONOSUPPORT, [EPROTOTYPE] = CLOUDABI_EPROTOTYPE, [ERANGE] = CLOUDABI_ERANGE, [EROFS] = CLOUDABI_EROFS, [ESPIPE] = CLOUDABI_ESPIPE, [ESRCH] = CLOUDABI_ESRCH, [ESTALE] = CLOUDABI_ESTALE, [ETIMEDOUT] = CLOUDABI_ETIMEDOUT, [ETXTBSY] = CLOUDABI_ETXTBSY, [EXDEV] = CLOUDABI_EXDEV, [ENOTCAPABLE] = CLOUDABI_ENOTCAPABLE, }; /* Unknown error: fall back to returning ENOSYS. */ if (error < 0 || error >= nitems(table) || table[error] == 0) return (error == 0 ? 0 : CLOUDABI_ENOSYS); return (table[error]); } Index: head/sys/compat/linux/linux_errno.inc =================================================================== --- head/sys/compat/linux/linux_errno.inc (revision 343110) +++ head/sys/compat/linux/linux_errno.inc (revision 343111) @@ -1,148 +1,149 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 1994-1996 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ /* * Linux syscalls return negative errno's, we do positive and map them * Reference: * FreeBSD: src/sys/sys/errno.h * Linux: include/uapi/asm-generic/errno-base.h * include/uapi/asm-generic/errno.h */ const int linux_errtbl[ELAST + 1] = { -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -35, /* EDEADLK */ -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -11, /* EAGAIN */ -115, -114, -88, -89, -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, -100, -101, -102, -103, -104, -105, -106, -107, -108, -109, -110, -111, -40, -36, -112, -113, -39, -11, -87, -122, -116, -66, -6, /* EBADRPC -> ENXIO */ -6, /* ERPCMISMATCH -> ENXIO */ -6, /* EPROGUNAVAIL -> ENXIO */ -6, /* EPROGMISMATCH -> ENXIO */ -6, /* EPROCUNAVAIL -> ENXIO */ -37, -38, -9, -6, /* EAUTH -> ENXIO */ -6, /* ENEEDAUTH -> ENXIO */ -43, -42, -75, -125, -84, -61, -22, /* EDOOFUS -> EINVAL */ -74, -72, -67, -71, -1, /* ENOTCAPABLE -> EPERM */ -1, /* ECAPMODE -> EPERM */ -131, /* ENOTRECOVERABLE */ -130, /* EOWNERDEAD */ + -22, /* EINTEGRITY -> EINVAL */ }; -_Static_assert(ELAST == 96, +_Static_assert(ELAST == 97, "missing errno entries in linux_errtbl"); Index: head/sys/security/audit/bsm_errno.c =================================================================== --- head/sys/security/audit/bsm_errno.c (revision 343110) +++ head/sys/security/audit/bsm_errno.c (revision 343111) @@ -1,774 +1,781 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2008 Apple Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include #include #include /* * Different operating systems use different numeric constants for different * error numbers, and sometimes error numbers don't exist in more than one * operating system. These routines convert between BSM and local error * number spaces, subject to the above realities. BSM error numbers are * stored in a single 8-bit character, so don't have a byte order. * * Don't include string definitions when this code is compiled into a kernel. */ struct bsm_errno { int be_bsm_errno; int be_local_errno; #if !defined(KERNEL) && !defined(_KERNEL) const char *be_strerror; #endif }; #define ERRNO_NO_LOCAL_MAPPING -600 #if !defined(KERNEL) && !defined(_KERNEL) #define ES(x) x #else #define ES(x) #endif /* * Mapping table -- please maintain in numeric sorted order with respect to * the BSM constant. Today we do a linear lookup, but could switch to a * binary search if it makes sense. We only ifdef errors that aren't * generally available, but it does make the table a lot more ugly. * * XXXRW: It would be nice to have a similar ordered table mapping to BSM * constant from local constant, but the order of local constants varies by * OS. Really we need to build that table at compile-time but don't do that * yet. * * XXXRW: We currently embed English-language error strings here, but should * support catalogues; these are only used if the OS doesn't have an error * string using strerror(3). */ static const struct bsm_errno bsm_errnos[] = { { BSM_ERRNO_ESUCCESS, 0, ES("Success") }, { BSM_ERRNO_EPERM, EPERM, ES("Operation not permitted") }, { BSM_ERRNO_ENOENT, ENOENT, ES("No such file or directory") }, { BSM_ERRNO_ESRCH, ESRCH, ES("No such process") }, { BSM_ERRNO_EINTR, EINTR, ES("Interrupted system call") }, { BSM_ERRNO_EIO, EIO, ES("Input/output error") }, { BSM_ERRNO_ENXIO, ENXIO, ES("Device not configured") }, { BSM_ERRNO_E2BIG, E2BIG, ES("Argument list too long") }, { BSM_ERRNO_ENOEXEC, ENOEXEC, ES("Exec format error") }, { BSM_ERRNO_EBADF, EBADF, ES("Bad file descriptor") }, { BSM_ERRNO_ECHILD, ECHILD, ES("No child processes") }, { BSM_ERRNO_EAGAIN, EAGAIN, ES("Resource temporarily unavailable") }, { BSM_ERRNO_ENOMEM, ENOMEM, ES("Cannot allocate memory") }, { BSM_ERRNO_EACCES, EACCES, ES("Permission denied") }, { BSM_ERRNO_EFAULT, EFAULT, ES("Bad address") }, { BSM_ERRNO_ENOTBLK, ENOTBLK, ES("Block device required") }, { BSM_ERRNO_EBUSY, EBUSY, ES("Device busy") }, { BSM_ERRNO_EEXIST, EEXIST, ES("File exists") }, { BSM_ERRNO_EXDEV, EXDEV, ES("Cross-device link") }, { BSM_ERRNO_ENODEV, ENODEV, ES("Operation not supported by device") }, { BSM_ERRNO_ENOTDIR, ENOTDIR, ES("Not a directory") }, { BSM_ERRNO_EISDIR, EISDIR, ES("Is a directory") }, { BSM_ERRNO_EINVAL, EINVAL, ES("Invalid argument") }, { BSM_ERRNO_ENFILE, ENFILE, ES("Too many open files in system") }, { BSM_ERRNO_EMFILE, EMFILE, ES("Too many open files") }, { BSM_ERRNO_ENOTTY, ENOTTY, ES("Inappropriate ioctl for device") }, { BSM_ERRNO_ETXTBSY, ETXTBSY, ES("Text file busy") }, { BSM_ERRNO_EFBIG, EFBIG, ES("File too large") }, { BSM_ERRNO_ENOSPC, ENOSPC, ES("No space left on device") }, { BSM_ERRNO_ESPIPE, ESPIPE, ES("Illegal seek") }, { BSM_ERRNO_EROFS, EROFS, ES("Read-only file system") }, { BSM_ERRNO_EMLINK, EMLINK, ES("Too many links") }, { BSM_ERRNO_EPIPE, EPIPE, ES("Broken pipe") }, { BSM_ERRNO_EDOM, EDOM, ES("Numerical argument out of domain") }, { BSM_ERRNO_ERANGE, ERANGE, ES("Result too large") }, { BSM_ERRNO_ENOMSG, ENOMSG, ES("No message of desired type") }, { BSM_ERRNO_EIDRM, EIDRM, ES("Identifier removed") }, { BSM_ERRNO_ECHRNG, #ifdef ECHRNG ECHRNG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Channel number out of range") }, { BSM_ERRNO_EL2NSYNC, #ifdef EL2NSYNC EL2NSYNC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 2 not synchronized") }, { BSM_ERRNO_EL3HLT, #ifdef EL3HLT EL3HLT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 3 halted") }, { BSM_ERRNO_EL3RST, #ifdef EL3RST EL3RST, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 3 reset") }, { BSM_ERRNO_ELNRNG, #ifdef ELNRNG ELNRNG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Link number out of range") }, { BSM_ERRNO_EUNATCH, #ifdef EUNATCH EUNATCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Protocol driver not attached") }, { BSM_ERRNO_ENOCSI, #ifdef ENOCSI ENOCSI, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No CSI structure available") }, { BSM_ERRNO_EL2HLT, #ifdef EL2HLT EL2HLT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Level 2 halted") }, { BSM_ERRNO_EDEADLK, EDEADLK, ES("Resource deadlock avoided") }, { BSM_ERRNO_ENOLCK, ENOLCK, ES("No locks available") }, { BSM_ERRNO_ECANCELED, ECANCELED, ES("Operation canceled") }, { BSM_ERRNO_ENOTSUP, ENOTSUP, ES("Operation not supported") }, { BSM_ERRNO_EDQUOT, EDQUOT, ES("Disc quota exceeded") }, { BSM_ERRNO_EBADE, #ifdef EBADE EBADE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid exchange") }, { BSM_ERRNO_EBADR, #ifdef EBADR EBADR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid request descriptor") }, { BSM_ERRNO_EXFULL, #ifdef EXFULL EXFULL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Exchange full") }, { BSM_ERRNO_ENOANO, #ifdef ENOANO ENOANO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No anode") }, { BSM_ERRNO_EBADRQC, #ifdef EBADRQC EBADRQC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid request descriptor") }, { BSM_ERRNO_EBADSLT, #ifdef EBADSLT EBADSLT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Invalid slot") }, { BSM_ERRNO_EDEADLOCK, #ifdef EDEADLOCK EDEADLOCK, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Resource deadlock avoided") }, { BSM_ERRNO_EBFONT, #ifdef EBFONT EBFONT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad font file format") }, { BSM_ERRNO_EOWNERDEAD, #ifdef EOWNERDEAD EOWNERDEAD, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Process died with the lock") }, + { BSM_ERRNO_EINTEGRITY, +#ifdef EINTEGRITY + EINTEGRITY, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Integrity check failed") }, { BSM_ERRNO_ENOTRECOVERABLE, #ifdef ENOTRECOVERABLE ENOTRECOVERABLE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Lock is not recoverable") }, { BSM_ERRNO_ENOSTR, #ifdef ENOSTR ENOSTR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Device not a stream") }, { BSM_ERRNO_ENONET, #ifdef ENONET ENONET, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Machine is not on the network") }, { BSM_ERRNO_ENOPKG, #ifdef ENOPKG ENOPKG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Package not installed") }, { BSM_ERRNO_EREMOTE, EREMOTE, ES("Too many levels of remote in path") }, { BSM_ERRNO_ENOLINK, #ifdef ENOLINK ENOLINK, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Link has been severed") }, { BSM_ERRNO_EADV, #ifdef EADV EADV, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Advertise error") }, { BSM_ERRNO_ESRMNT, #ifdef ESRMNT ESRMNT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("srmount error") }, { BSM_ERRNO_ECOMM, #ifdef ECOMM ECOMM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Communication error on send") }, { BSM_ERRNO_EPROTO, #ifdef EPROTO EPROTO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Protocol error") }, { BSM_ERRNO_ELOCKUNMAPPED, #ifdef ELOCKUNMAPPED ELOCKUNMAPPED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Locked lock was unmapped") }, { BSM_ERRNO_ENOTACTIVE, #ifdef ENOTACTIVE ENOTACTIVE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Facility is not active") }, { BSM_ERRNO_EMULTIHOP, #ifdef EMULTIHOP EMULTIHOP, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Multihop attempted") }, { BSM_ERRNO_EBADMSG, #ifdef EBADMSG EBADMSG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad message") }, { BSM_ERRNO_ENAMETOOLONG, ENAMETOOLONG, ES("File name too long") }, { BSM_ERRNO_EOVERFLOW, EOVERFLOW, ES("Value too large to be stored in data type") }, { BSM_ERRNO_ENOTUNIQ, #ifdef ENOTUNIQ ENOTUNIQ, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Given log name not unique") }, { BSM_ERRNO_EBADFD, #ifdef EBADFD EBADFD, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Given f.d. invalid for this operation") }, { BSM_ERRNO_EREMCHG, #ifdef EREMCHG EREMCHG, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Remote address changed") }, { BSM_ERRNO_ELIBACC, #ifdef ELIBACC ELIBACC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Can't access a needed shared lib") }, { BSM_ERRNO_ELIBBAD, #ifdef ELIBBAD ELIBBAD, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Accessing a corrupted shared lib") }, { BSM_ERRNO_ELIBSCN, #ifdef ELIBSCN ELIBSCN, #else ERRNO_NO_LOCAL_MAPPING, #endif ES(".lib section in a.out corrupted") }, { BSM_ERRNO_ELIBMAX, #ifdef ELIBMAX ELIBMAX, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Attempting to link in too many libs") }, { BSM_ERRNO_ELIBEXEC, #ifdef ELIBEXEC ELIBEXEC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Attempting to exec a shared library") }, { BSM_ERRNO_EILSEQ, EILSEQ, ES("Illegal byte sequence") }, { BSM_ERRNO_ENOSYS, ENOSYS, ES("Function not implemented") }, { BSM_ERRNO_ELOOP, ELOOP, ES("Too many levels of symbolic links") }, { BSM_ERRNO_ERESTART, #ifdef ERESTART ERESTART, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Restart syscall") }, { BSM_ERRNO_ESTRPIPE, #ifdef ESTRPIPE ESTRPIPE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("If pipe/FIFO, don't sleep in stream head") }, { BSM_ERRNO_ENOTEMPTY, ENOTEMPTY, ES("Directory not empty") }, { BSM_ERRNO_EUSERS, EUSERS, ES("Too many users") }, { BSM_ERRNO_ENOTSOCK, ENOTSOCK, ES("Socket operation on non-socket") }, { BSM_ERRNO_EDESTADDRREQ, EDESTADDRREQ, ES("Destination address required") }, { BSM_ERRNO_EMSGSIZE, EMSGSIZE, ES("Message too long") }, { BSM_ERRNO_EPROTOTYPE, EPROTOTYPE, ES("Protocol wrong type for socket") }, { BSM_ERRNO_ENOPROTOOPT, ENOPROTOOPT, ES("Protocol not available") }, { BSM_ERRNO_EPROTONOSUPPORT, EPROTONOSUPPORT, ES("Protocol not supported") }, { BSM_ERRNO_ESOCKTNOSUPPORT, ESOCKTNOSUPPORT, ES("Socket type not supported") }, { BSM_ERRNO_EOPNOTSUPP, EOPNOTSUPP, ES("Operation not supported") }, { BSM_ERRNO_EPFNOSUPPORT, EPFNOSUPPORT, ES("Protocol family not supported") }, { BSM_ERRNO_EAFNOSUPPORT, EAFNOSUPPORT, ES("Address family not supported by protocol family") }, { BSM_ERRNO_EADDRINUSE, EADDRINUSE, ES("Address already in use") }, { BSM_ERRNO_EADDRNOTAVAIL, EADDRNOTAVAIL, ES("Can't assign requested address") }, { BSM_ERRNO_ENETDOWN, ENETDOWN, ES("Network is down") }, { BSM_ERRNO_ENETRESET, ENETRESET, ES("Network dropped connection on reset") }, { BSM_ERRNO_ECONNABORTED, ECONNABORTED, ES("Software caused connection abort") }, { BSM_ERRNO_ECONNRESET, ECONNRESET, ES("Connection reset by peer") }, { BSM_ERRNO_ENOBUFS, ENOBUFS, ES("No buffer space available") }, { BSM_ERRNO_EISCONN, EISCONN, ES("Socket is already connected") }, { BSM_ERRNO_ENOTCONN, ENOTCONN, ES("Socket is not connected") }, { BSM_ERRNO_ESHUTDOWN, ESHUTDOWN, ES("Can't send after socket shutdown") }, { BSM_ERRNO_ETOOMANYREFS, ETOOMANYREFS, ES("Too many references: can't splice") }, { BSM_ERRNO_ETIMEDOUT, ETIMEDOUT, ES("Operation timed out") }, { BSM_ERRNO_ECONNREFUSED, ECONNREFUSED, ES("Connection refused") }, { BSM_ERRNO_EHOSTDOWN, EHOSTDOWN, ES("Host is down") }, { BSM_ERRNO_EHOSTUNREACH, EHOSTUNREACH, ES("No route to host") }, { BSM_ERRNO_EALREADY, EALREADY, ES("Operation already in progress") }, { BSM_ERRNO_EINPROGRESS, EINPROGRESS, ES("Operation now in progress") }, { BSM_ERRNO_ESTALE, ESTALE, ES("Stale NFS file handle") }, { BSM_ERRNO_EPROCLIM, #ifdef EPROCLIM EPROCLIM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Too many processes") }, { BSM_ERRNO_EBADRPC, #ifdef EBADRPC EBADRPC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC struct is bad") }, { BSM_ERRNO_ERPCMISMATCH, #ifdef ERPCMISMATCH ERPCMISMATCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC version wrong") }, { BSM_ERRNO_EPROGUNAVAIL, #ifdef EPROGUNAVAIL EPROGUNAVAIL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC prog. not avail") }, { BSM_ERRNO_EPROGMISMATCH, #ifdef EPROGMISMATCH EPROGMISMATCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RPC version wrong") }, { BSM_ERRNO_EPROCUNAVAIL, #ifdef EPROCUNAVAIL EPROCUNAVAIL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad procedure for program") }, { BSM_ERRNO_EFTYPE, #ifdef EFTYPE EFTYPE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Inappropriate file type or format") }, { BSM_ERRNO_EAUTH, #ifdef EAUTH EAUTH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Authenticateion error") }, { BSM_ERRNO_ENEEDAUTH, #ifdef ENEEDAUTH ENEEDAUTH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Need authenticator") }, { BSM_ERRNO_ENOATTR, #ifdef ENOATTR ENOATTR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Attribute not found") }, { BSM_ERRNO_EDOOFUS, #ifdef EDOOFUS EDOOFUS, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Programming error") }, { BSM_ERRNO_EJUSTRETURN, #ifdef EJUSTRETURN EJUSTRETURN, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Just return") }, { BSM_ERRNO_ENOIOCTL, #ifdef ENOIOCTL ENOIOCTL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("ioctl not handled by this layer") }, { BSM_ERRNO_EDIRIOCTL, #ifdef EDIRIOCTL EDIRIOCTL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("do direct ioctl in GEOM") }, { BSM_ERRNO_EPWROFF, #ifdef EPWROFF EPWROFF, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Device power is off") }, { BSM_ERRNO_EDEVERR, #ifdef EDEVERR EDEVERR, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Device error") }, { BSM_ERRNO_EBADEXEC, #ifdef EBADEXEC EBADEXEC, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad executable") }, { BSM_ERRNO_EBADARCH, #ifdef EBADARCH EBADARCH, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad CPU type in executable") }, { BSM_ERRNO_ESHLIBVERS, #ifdef ESHLIBVERS ESHLIBVERS, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Shared library version mismatch") }, { BSM_ERRNO_EBADMACHO, #ifdef EBADMACHO EBADMACHO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Malformed Macho file") }, { BSM_ERRNO_EPOLICY, #ifdef EPOLICY EPOLICY, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Operation failed by policy") }, { BSM_ERRNO_EDOTDOT, #ifdef EDOTDOT EDOTDOT, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("RFS specific error") }, { BSM_ERRNO_EUCLEAN, #ifdef EUCLEAN EUCLEAN, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Structure needs cleaning") }, { BSM_ERRNO_ENOTNAM, #ifdef ENOTNAM ENOTNAM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Not a XENIX named type file") }, { BSM_ERRNO_ENAVAIL, #ifdef ENAVAIL ENAVAIL, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No XENIX semaphores available") }, { BSM_ERRNO_EISNAM, #ifdef EISNAM EISNAM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Is a named type file") }, { BSM_ERRNO_EREMOTEIO, #ifdef EREMOTEIO EREMOTEIO, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Remote I/O error") }, { BSM_ERRNO_ENOMEDIUM, #ifdef ENOMEDIUM ENOMEDIUM, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("No medium found") }, { BSM_ERRNO_EMEDIUMTYPE, #ifdef EMEDIUMTYPE EMEDIUMTYPE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Wrong medium type") }, { BSM_ERRNO_ENOKEY, #ifdef ENOKEY ENOKEY, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Required key not available") }, { BSM_ERRNO_EKEYEXPIRED, #ifdef EKEYEXPIRED EKEYEXPIRED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Key has expired") }, { BSM_ERRNO_EKEYREVOKED, #ifdef EKEYREVOKED EKEYREVOKED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Key has been revoked") }, { BSM_ERRNO_EKEYREJECTED, #ifdef EKEYREJECTED EKEYREJECTED, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Key was rejected by service") }, { BSM_ERRNO_ENOTCAPABLE, #ifdef ENOTCAPABLE ENOTCAPABLE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Capabilities insufficient") }, { BSM_ERRNO_ECAPMODE, #ifdef ECAPMODE ECAPMODE, #else ERRNO_NO_LOCAL_MAPPING, #endif ES("Not permitted in capability mode") }, }; static const struct bsm_errno * bsm_lookup_errno_local(int local_errno) { int i; for (i = 0; i < nitems(bsm_errnos); i++) { if (bsm_errnos[i].be_local_errno == local_errno) return (&bsm_errnos[i]); } return (NULL); } /* * Conversion to the BSM errno space isn't allowed to fail; we simply map to * BSM_ERRNO_UNKNOWN and let the remote endpoint deal with it. */ u_char au_errno_to_bsm(int local_errno) { const struct bsm_errno *bsme; bsme = bsm_lookup_errno_local(local_errno); if (bsme == NULL) return (BSM_ERRNO_UNKNOWN); return (bsme->be_bsm_errno); } static const struct bsm_errno * bsm_lookup_errno_bsm(u_char bsm_errno) { int i; for (i = 0; i < nitems(bsm_errnos); i++) { if (bsm_errnos[i].be_bsm_errno == bsm_errno) return (&bsm_errnos[i]); } return (NULL); } /* * Converstion from a BSM error to a local error number may fail if either * OpenBSM doesn't recognize the error on the wire, or because there is no * appropriate local mapping. */ int au_bsm_to_errno(u_char bsm_errno, int *errorp) { const struct bsm_errno *bsme; bsme = bsm_lookup_errno_bsm(bsm_errno); if (bsme == NULL || bsme->be_local_errno == ERRNO_NO_LOCAL_MAPPING) return (-1); *errorp = bsme->be_local_errno; return (0); } #if !defined(KERNEL) && !defined(_KERNEL) const char * au_strerror(u_char bsm_errno) { const struct bsm_errno *bsme; bsme = bsm_lookup_errno_bsm(bsm_errno); if (bsme == NULL) return ("Unrecognized BSM error"); if (bsme->be_local_errno != ERRNO_NO_LOCAL_MAPPING) return (strerror(bsme->be_local_errno)); return (bsme->be_strerror); } #endif Index: head/sys/sys/errno.h =================================================================== --- head/sys/sys/errno.h (revision 343110) +++ head/sys/sys/errno.h (revision 343111) @@ -1,208 +1,209 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)errno.h 8.5 (Berkeley) 1/21/94 * $FreeBSD$ */ #ifndef _SYS_ERRNO_H_ #define _SYS_ERRNO_H_ #if !defined(_KERNEL) && !defined(_STANDALONE) #include __BEGIN_DECLS int * __error(void); __END_DECLS #define errno (* __error()) #endif #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* Input/output error */ #define ENXIO 6 /* Device not configured */ #define E2BIG 7 /* Argument list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file descriptor */ #define ECHILD 10 /* No child processes */ #define EDEADLK 11 /* Resource deadlock avoided */ /* 11 was EAGAIN */ #define ENOMEM 12 /* Cannot allocate memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #ifndef _POSIX_SOURCE #define ENOTBLK 15 /* Block device required */ #endif #define EBUSY 16 /* Device busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* Operation not supported by device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* Too many open files in system */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Inappropriate ioctl for device */ #ifndef _POSIX_SOURCE #define ETXTBSY 26 /* Text file busy */ #endif #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only filesystem */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ /* math software */ #define EDOM 33 /* Numerical argument out of domain */ #define ERANGE 34 /* Result too large */ /* non-blocking and interrupt i/o */ #define EAGAIN 35 /* Resource temporarily unavailable */ #ifndef _POSIX_SOURCE #define EWOULDBLOCK EAGAIN /* Operation would block */ #define EINPROGRESS 36 /* Operation now in progress */ #define EALREADY 37 /* Operation already in progress */ /* ipc/network software -- argument errors */ #define ENOTSOCK 38 /* Socket operation on non-socket */ #define EDESTADDRREQ 39 /* Destination address required */ #define EMSGSIZE 40 /* Message too long */ #define EPROTOTYPE 41 /* Protocol wrong type for socket */ #define ENOPROTOOPT 42 /* Protocol not available */ #define EPROTONOSUPPORT 43 /* Protocol not supported */ #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ #define EOPNOTSUPP 45 /* Operation not supported */ #define ENOTSUP EOPNOTSUPP /* Operation not supported */ #define EPFNOSUPPORT 46 /* Protocol family not supported */ #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ #define EADDRINUSE 48 /* Address already in use */ #define EADDRNOTAVAIL 49 /* Can't assign requested address */ /* ipc/network software -- operational errors */ #define ENETDOWN 50 /* Network is down */ #define ENETUNREACH 51 /* Network is unreachable */ #define ENETRESET 52 /* Network dropped connection on reset */ #define ECONNABORTED 53 /* Software caused connection abort */ #define ECONNRESET 54 /* Connection reset by peer */ #define ENOBUFS 55 /* No buffer space available */ #define EISCONN 56 /* Socket is already connected */ #define ENOTCONN 57 /* Socket is not connected */ #define ESHUTDOWN 58 /* Can't send after socket shutdown */ #define ETOOMANYREFS 59 /* Too many references: can't splice */ #define ETIMEDOUT 60 /* Operation timed out */ #define ECONNREFUSED 61 /* Connection refused */ #define ELOOP 62 /* Too many levels of symbolic links */ #endif /* _POSIX_SOURCE */ #define ENAMETOOLONG 63 /* File name too long */ /* should be rearranged */ #ifndef _POSIX_SOURCE #define EHOSTDOWN 64 /* Host is down */ #define EHOSTUNREACH 65 /* No route to host */ #endif /* _POSIX_SOURCE */ #define ENOTEMPTY 66 /* Directory not empty */ /* quotas & mush */ #ifndef _POSIX_SOURCE #define EPROCLIM 67 /* Too many processes */ #define EUSERS 68 /* Too many users */ #define EDQUOT 69 /* Disc quota exceeded */ /* Network File System */ #define ESTALE 70 /* Stale NFS file handle */ #define EREMOTE 71 /* Too many levels of remote in path */ #define EBADRPC 72 /* RPC struct is bad */ #define ERPCMISMATCH 73 /* RPC version wrong */ #define EPROGUNAVAIL 74 /* RPC prog. not avail */ #define EPROGMISMATCH 75 /* Program version wrong */ #define EPROCUNAVAIL 76 /* Bad procedure for program */ #endif /* _POSIX_SOURCE */ #define ENOLCK 77 /* No locks available */ #define ENOSYS 78 /* Function not implemented */ #ifndef _POSIX_SOURCE #define EFTYPE 79 /* Inappropriate file type or format */ #define EAUTH 80 /* Authentication error */ #define ENEEDAUTH 81 /* Need authenticator */ #define EIDRM 82 /* Identifier removed */ #define ENOMSG 83 /* No message of desired type */ #define EOVERFLOW 84 /* Value too large to be stored in data type */ #define ECANCELED 85 /* Operation canceled */ #define EILSEQ 86 /* Illegal byte sequence */ #define ENOATTR 87 /* Attribute not found */ #define EDOOFUS 88 /* Programming error */ #endif /* _POSIX_SOURCE */ #define EBADMSG 89 /* Bad message */ #define EMULTIHOP 90 /* Multihop attempted */ #define ENOLINK 91 /* Link has been severed */ #define EPROTO 92 /* Protocol error */ #ifndef _POSIX_SOURCE #define ENOTCAPABLE 93 /* Capabilities insufficient */ #define ECAPMODE 94 /* Not permitted in capability mode */ #define ENOTRECOVERABLE 95 /* State not recoverable */ #define EOWNERDEAD 96 /* Previous owner died */ +#define EINTEGRITY 97 /* Integrity check failed */ #endif /* _POSIX_SOURCE */ #ifndef _POSIX_SOURCE -#define ELAST 96 /* Must be equal largest errno */ +#define ELAST 97 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ #if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) /* pseudo-errors returned inside kernel to modify return to process */ #define ERESTART (-1) /* restart syscall */ #define EJUSTRETURN (-2) /* don't modify regs, just return */ #define ENOIOCTL (-3) /* ioctl not handled by this layer */ #define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ #define ERELOOKUP (-5) /* retry the directory lookup */ #endif #ifndef _KERNEL #if __EXT1_VISIBLE /* ISO/IEC 9899:2011 K.3.2.2 */ #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED typedef int errno_t; #endif #endif /* __EXT1_VISIBLE */ #endif #endif