From patchwork Fri Oct 13 23:26:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 77764 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E71E385734B for ; Fri, 13 Oct 2023 23:26:28 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id D6EFD3858D28 for ; Fri, 13 Oct 2023 23:26:15 +0000 (GMT) ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D6EFD3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.129.153 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697239577; cv=none; b=rZ2A422oXaa4rKzVVNC4nrjajr+KNgf7g89rltTQYwDBDXNZURbR7cqbcpzt8eslIUfQoumK67yp1M/rynm/AlZCLLppjhof8YcummLWsUlrDIq9hNjBiTfH7G+obCUdcK/8Btbsx+A1253Lv5Lbv0ZsG2cTNtsGYDbPUX/Ozjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697239577; c=relaxed/simple; bh=yuAeKg/L3iCz1xlIK2dAoy6zA5Rd5Q0ibY9h7qvnmjo=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=x6nNbErRDTr6Eb9aicHxVTHRXIvYztgLOvmHtSXmRJ4L51nSw/vqoATyQZaalwgKxoWOuK2SRCv885bKrwfyMEd3Ua0/2gw7/kBUKhACysutPP4enVXggTJ6Qus+9TMiaIMh9oiMpszzARAQ/Q6GPMb7JbsQD/ckOnnD5rOL3RY= ARC-Authentication-Results: i=1; server2.sourceware.org DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D6EFD3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-CSE-ConnectionGUID: /n63KLJ4Qj2bK7I+gFCPdQ== X-CSE-MsgGUID: CR8yG5pOTGedb2WZb0WzqA== X-IronPort-AV: E=Sophos;i="6.03,223,1694764800"; d="scan'208";a="21984589" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 13 Oct 2023 15:26:14 -0800 IronPort-SDR: Aaz3OVPMHrZGzjYuMQVxqBs/0+V9Ke8CTPtuSEhSWzKv3yDrsoyDacaLPRzf5zoIJDEtaRZjGd Qpo3bVzar2raZY5gomaAsHaQ/aSlrLBEOPId3yPpSoUTiAY6sp8tOU/IwniMpf04B+o5WgK52v o3a270R6r2wvMjaBoIjVfuOp4bXuYMq2vJdeYXow3rWlWHkGTPG98yDSi1ddQdGuxvhOysZBuT ftXuNURouCqKszHIY1L50gPG3wcUVe3ILJqEn9iAJxoiebNGlp6zPvCbe7UkAISAWC3xmGwy5z 4y8= Date: Fri, 13 Oct 2023 23:26:10 +0000 From: Joseph Myers To: Subject: Add AT_HANDLE_FID from Linux 6.5 to bits/fcntl-linux.h Message-ID: <51bfe740-7f2f-9f14-1ad-4a20e61a3a25@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3109.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Linux 6.5 adds a constant AT_HANDLE_FID; add it to glibc. Because this is a flag for the function name_to_handle_at declared in bits/fcntl-linux.h, put the flag there rather than alongside other AT_* flags in (OS-independent) fcntl.h. Tested for x86_64. diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h index df378c7b89..dd9d9baf09 100644 --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h @@ -368,6 +368,17 @@ struct file_handle # define MAX_HANDLE_SZ 128 #endif +#ifdef __USE_GNU +/* Flags for name_to_handle_at. See comment in fcntl.h about the use + of the same AT_* flag bits for different purposes in different + functions. */ +# define AT_HANDLE_FID AT_REMOVEDIR /* File handle is needed + to compare object + identity and may not + be usable to + open_by_handle_at. */ +#endif + __BEGIN_DECLS #ifdef __USE_GNU