From owner-svn-src-projects@freebsd.org Thu Aug 6 16:25:57 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA1053A654F for ; Thu, 6 Aug 2020 16:25:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BMv4P4tVRz4KP3; Thu, 6 Aug 2020 16:25:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 713839C28; Thu, 6 Aug 2020 16:25:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 076GPvuj053799; Thu, 6 Aug 2020 16:25:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 076GPvGF053798; Thu, 6 Aug 2020 16:25:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008061625.076GPvGF053798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 6 Aug 2020 16:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r363968 - projects/clang1100-import/contrib/llvm-project/libcxx/include X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang1100-import/contrib/llvm-project/libcxx/include X-SVN-Commit-Revision: 363968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2020 16:25:57 -0000 Author: dim Date: Thu Aug 6 16:25:56 2020 New Revision: 363968 URL: https://svnweb.freebsd.org/changeset/base/363968 Log: Reapply r343111 (partially, by mckusick): Create new EINTEGRITY error with message "Integrity check failed". An integrity check such as a check-hash or a cross-correlation failed. The integrity error falls between EINVAL that identifies errors in parameters to a system call and EIO that identifies errors with the underlying storage media. EINTEGRITY 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 mount(8) command to return a different exit value to automate the running of fsck(8) during a system boot. These changes make no use of the new error, they just add it. Later commits will be made for the use of the new error number and it will be added to additional manual pages as appropriate. Reviewed by: gnn, dim, brueffer, imp Discussed with: kib, cem, emaste, ed, jilles Differential Revision: https://reviews.freebsd.org/D18765 Modified: projects/clang1100-import/contrib/llvm-project/libcxx/include/__errc projects/clang1100-import/contrib/llvm-project/libcxx/include/errno.h Modified: projects/clang1100-import/contrib/llvm-project/libcxx/include/__errc ============================================================================== --- projects/clang1100-import/contrib/llvm-project/libcxx/include/__errc Thu Aug 6 16:20:45 2020 (r363967) +++ projects/clang1100-import/contrib/llvm-project/libcxx/include/__errc Thu Aug 6 16:25:56 2020 (r363968) @@ -45,6 +45,7 @@ enum class errc identifier_removed, // EIDRM illegal_byte_sequence, // EILSEQ inappropriate_io_control_operation, // ENOTTY + integrity_check_failed, // EINTEGRITY interrupted, // EINTR invalid_argument, // EINVAL invalid_seek, // ESPIPE @@ -142,6 +143,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc) identifier_removed = EIDRM, illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, + integrity_check_failed = EINTEGRITY, interrupted = EINTR, invalid_argument = EINVAL, invalid_seek = ESPIPE, Modified: projects/clang1100-import/contrib/llvm-project/libcxx/include/errno.h ============================================================================== --- projects/clang1100-import/contrib/llvm-project/libcxx/include/errno.h Thu Aug 6 16:20:45 2020 (r363967) +++ projects/clang1100-import/contrib/llvm-project/libcxx/include/errno.h Thu Aug 6 16:25:56 2020 (r363968) @@ -32,49 +32,79 @@ Macros: #ifdef __cplusplus -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) -#ifdef ELAST +#if defined(ELAST) static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; +static const int __elast3 = ELAST+3; #else static const int __elast1 = 104; static const int __elast2 = 105; +static const int __elast3 = 106; #endif -#ifdef ENOTRECOVERABLE +#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#define EINTEGRITY __elast3 +#if defined(ELAST) +#undef ELAST +#define ELAST EINTEGRITY +#endif +#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#if defined(ELAST) +#undef ELAST +#define ELAST EOWNERDEAD +#endif + +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 +#define EINTEGRITY __elast2 +#if defined(ELAST) +#undef ELAST +#define ELAST EINTEGRITY +#endif -#ifdef ELAST +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define EOWNERDEAD __elast1 +#if defined(ELAST) #undef ELAST #define ELAST EOWNERDEAD #endif -#elif defined(EOWNERDEAD) +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EINTEGRITY __elast2 +#if defined(ELAST) +#undef ELAST +#define ELAST EINTEGRITY +#endif +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST ENOTRECOVERABLE #endif -#else // defined(EOWNERDEAD) - -#define EOWNERDEAD __elast1 -#define ENOTRECOVERABLE __elast2 -#ifdef ELAST +#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define EINTEGRITY __elast1 +#if defined(ELAST) #undef ELAST -#define ELAST ENOTRECOVERABLE +#define ELAST EINTEGRITY #endif -#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 @@ -390,6 +420,10 @@ static const int __elast2 = 105; #ifndef EMLINK #define EMLINK 9979 +#endif + +#ifndef EINTEGRITY +#define EINTEGRITY 9980 #endif #endif // __cplusplus