From patchwork Sun Feb 9 20:20:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 37810 X-Patchwork-Delegate: carlos@redhat.com Received: (qmail 18390 invoked by alias); 9 Feb 2020 20:20:09 -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 18262 invoked by uid 89); 9 Feb 2020 20:20:08 -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=HX-Languages-Length:951 X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581279605; 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=Hl/R2wyABzCaUHfOuBxBXu1pA1OfQSly79vlej8CZMU=; b=TFfPC4Wbqg+8pNiY7/exYadYON47mLXSDzCU16/mjvGSvX4BhipUyubFVU+ua8H8SUzV/G ZvhkPqg5Uvy8MCWLDPEzL96G9k/ISrrAJ0IcGJj8EfcGpPQjMIlY0rpVloQO3Mp8zJe16M 8Bxt3VEY0AjWcj/N3ssvqCM3WyjRopc= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 06/26] Linux: statx syscall number is always available In-Reply-To: References: X-From-Line: acfb96832ad33b9e21e39c9a0e252e279f512dc5 Mon Sep 17 00:00:00 2001 Message-Id: Date: Sun, 09 Feb 2020 21:20:00 +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 Due to the built-in tables, __NR_statx is always defined. Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/statx.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/statx.c b/sysdeps/unix/sysv/linux/statx.c index a119b7a29e..9721fc12a5 100644 --- a/sysdeps/unix/sysv/linux/statx.c +++ b/sysdeps/unix/sysv/linux/statx.c @@ -25,17 +25,14 @@ int statx (int fd, const char *path, int flags, unsigned int mask, struct statx *buf) { -#ifdef __NR_statx int ret = INLINE_SYSCALL_CALL (statx, fd, path, flags, mask, buf); -# ifdef __ASSUME_STATX +#ifdef __ASSUME_STATX return ret; -# else +#else if (ret == 0 || errno != ENOSYS) /* Preserve non-error/non-ENOSYS return values. */ return ret; -# endif -#endif -#ifndef __ASSUME_STATX - return statx_generic (fd, path, flags, mask, buf); + else + return statx_generic (fd, path, flags, mask, buf); #endif }