From patchwork Sun Feb 9 20:20:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1235557 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-109320-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=jR0qEJbd; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Y49WDi/Q; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48G0mg3DNtz9sRR for ; Mon, 10 Feb 2020 07:21:23 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:in-reply-to:references :message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=blczLSdzbUzwhtkv gl/KxpapjNVohUPqecZovprHeGwZaGF1ApCwk1N2oZjgxPMm6jzkdI2BdAEiTb1/ cAiTrn0Javb/EAkcZodfP4Ploec1s3nKXdpJxzVZHa/i5LDJlWo22tp+mzv6iPdL qy4D0BS5zxYUA+octd6XQ5iryNc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:in-reply-to:references :message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=Sp/Yd4AMf4sbWwN9YOY9bz 9+VJw=; b=jR0qEJbdI9cqrpvRu8Wj5ODw/EBOyzULlEGwctcAZEatp2YWfxdtK8 cZlLVLlGYT5e+w7MqhDjun5ckptHFlW1QQcFCqDyYESCvhHgLY2pC0lu2lnjzCSk nNlEeS7YtFX7MyrfmRxwC6l7rNaF0Sh97Z1lB5Hc4pSwhZTZhfhQw= Received: (qmail 22281 invoked by alias); 9 Feb 2020 20:20:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 22205 invoked by uid 89); 9 Feb 2020 20:20:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=invention X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581279633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HN7BUtUr6Vn80CdVv5snqptqnD/q8VD9k3ZoWz0O6nE=; b=Y49WDi/QruizQ+GJ8IukveJdoFeMXmoOxYIXTQLI2teH9WWVGAVO8QCj3CFa9DElygt0a5 V2c+CB/SOFN/ER5ZoXC3Tok8uCgN//aPGauXBBegcGJns0FCnRMx5IKuXH8XMGrfAVvD/M ZE7DIO0fXJEX/CZYFskUpX1JWzfWMq0= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 12/26] Linux: Clean up preadv, pwritev system call names In-Reply-To: References: X-From-Line: 73e1a225ad623b0dff1bdd99574030bbe32a16a8 Mon Sep 17 00:00:00 2001 Message-Id: <73e1a225ad623b0dff1bdd99574030bbe32a16a8.1581279333.git.fweimer@redhat.com> Date: Sun, 09 Feb 2020 21:20:28 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com The names __NR_preadv64, __NR_pwritev64 appear to be a glibc invention. With the built-in tables, __NR_preadv and __NR_pwritev are always defined. Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/preadv.c | 6 ------ sysdeps/unix/sysv/linux/preadv64.c | 10 ++-------- sysdeps/unix/sysv/linux/pwritev.c | 6 ------ sysdeps/unix/sysv/linux/pwritev64.c | 10 ++-------- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/sysdeps/unix/sysv/linux/preadv.c b/sysdeps/unix/sysv/linux/preadv.c index 2a55d8c142..9fccb917a1 100644 --- a/sysdeps/unix/sysv/linux/preadv.c +++ b/sysdeps/unix/sysv/linux/preadv.c @@ -22,10 +22,6 @@ # ifdef __ASSUME_PREADV -# ifndef __NR_preadv -# define __NR_preadv __NR_preadv64 -# endif - ssize_t preadv (int fd, const struct iovec *vector, int count, off_t offset) { @@ -37,12 +33,10 @@ static ssize_t __atomic_preadv_replacement (int, const struct iovec *, ssize_t preadv (int fd, const struct iovec *vector, int count, off_t offset) { -# ifdef __NR_preadv ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -# endif return __atomic_preadv_replacement (fd, vector, count, offset); } # define PREADV static __atomic_preadv_replacement diff --git a/sysdeps/unix/sysv/linux/preadv64.c b/sysdeps/unix/sysv/linux/preadv64.c index fb471f0d9d..9fe43522a5 100644 --- a/sysdeps/unix/sysv/linux/preadv64.c +++ b/sysdeps/unix/sysv/linux/preadv64.c @@ -20,14 +20,10 @@ #ifdef __ASSUME_PREADV -# ifndef __NR_preadv64 -# define __NR_preadv64 __NR_preadv -# endif - ssize_t preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) { - return SYSCALL_CANCEL (preadv64, fd, vector, count, LO_HI_LONG (offset)); + return SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset)); } #else static ssize_t __atomic_preadv64_replacement (int, const struct iovec *, @@ -35,12 +31,10 @@ static ssize_t __atomic_preadv64_replacement (int, const struct iovec *, ssize_t preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) { -#ifdef __NR_preadv64 - ssize_t result = SYSCALL_CANCEL (preadv64, fd, vector, count, + ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -#endif return __atomic_preadv64_replacement (fd, vector, count, offset); } # define PREADV static __atomic_preadv64_replacement diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c index 7abe47be06..d6cb3c8d5c 100644 --- a/sysdeps/unix/sysv/linux/pwritev.c +++ b/sysdeps/unix/sysv/linux/pwritev.c @@ -22,10 +22,6 @@ # ifdef __ASSUME_PREADV -# ifndef __NR_pwritev -# define __NR_pwritev __NR_pwritev64 -# endif - ssize_t pwritev (int fd, const struct iovec *vector, int count, off_t offset) { @@ -37,12 +33,10 @@ static ssize_t __atomic_pwritev_replacement (int, const struct iovec *, ssize_t pwritev (int fd, const struct iovec *vector, int count, off_t offset) { -# ifdef __NR_pwritev ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -# endif return __atomic_pwritev_replacement (fd, vector, count, offset); } # define PWRITEV static __atomic_pwritev_replacement diff --git a/sysdeps/unix/sysv/linux/pwritev64.c b/sysdeps/unix/sysv/linux/pwritev64.c index 9bb0399c44..08bda27d4f 100644 --- a/sysdeps/unix/sysv/linux/pwritev64.c +++ b/sysdeps/unix/sysv/linux/pwritev64.c @@ -20,14 +20,10 @@ #ifdef __ASSUME_PWRITEV -# ifndef __NR_pwritev64 -# define __NR_pwritev64 __NR_pwritev -# endif - ssize_t pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset) { - return SYSCALL_CANCEL (pwritev64, fd, vector, count, LO_HI_LONG (offset)); + return SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset)); } #else static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *, @@ -35,12 +31,10 @@ static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *, ssize_t pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset) { -#ifdef __NR_pwritev64 - ssize_t result = SYSCALL_CANCEL (pwritev64, fd, vector, count, + ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -#endif return __atomic_pwritev64_replacement (fd, vector, count, offset); } # define PWRITEV static __atomic_pwritev64_replacement