From patchwork Wed Aug 1 18:40:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 10552803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 08D4913BF for ; Wed, 1 Aug 2018 18:40:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E936F2BB09 for ; Wed, 1 Aug 2018 18:40:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCD362BB0F; Wed, 1 Aug 2018 18:40:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83CB22BB09 for ; Wed, 1 Aug 2018 18:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732530AbeHAU16 (ORCPT ); Wed, 1 Aug 2018 16:27:58 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53460 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732111AbeHAU16 (ORCPT ); Wed, 1 Aug 2018 16:27:58 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A05BA40241C4 for ; Wed, 1 Aug 2018 18:40:52 +0000 (UTC) Received: from steved.boston.devel.redhat.com (steved.boston.devel.redhat.com [10.19.60.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8686D2026D68; Wed, 1 Aug 2018 18:40:52 +0000 (UTC) From: Steve Dickson To: "J . Bruce Fields" Cc: Linux NFS Mailing list Subject: [PATCH] Turn ENOATTR errors into ENODATA errrors Date: Wed, 1 Aug 2018 14:40:52 -0400 Message-Id: <20180801184052.21215-1-steved@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 01 Aug 2018 18:40:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 01 Aug 2018 18:40:52 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'steved@redhat.com' RCPT:'' Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The defining of ENOATTR, which was an defined as ENODATA, was removed from the attr/xattr.h in modern releases Signed-off-by: Steve Dickson --- libnfs4acl/nfs4_acl_for_path.c | 2 +- libnfs4acl/nfs4_set_acl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libnfs4acl/nfs4_acl_for_path.c b/libnfs4acl/nfs4_acl_for_path.c index a51dc34..2fbf6c9 100644 --- a/libnfs4acl/nfs4_acl_for_path.c +++ b/libnfs4acl/nfs4_acl_for_path.c @@ -94,7 +94,7 @@ static int nfs4_getxattr(const char *path, void *value, size_t size) if (res < -10000) { fprintf(stderr,"An internal NFS server error code (%d) was returned; this should never happen.\n",res); } else if (res < 0) { - if (errno == ENOATTR) + if (errno == ENODATA) fprintf(stderr,"Attribute not found on file: %s\n", path); else if (errno == EREMOTEIO) fprintf(stderr,"An NFS server error occurred.\n"); diff --git a/libnfs4acl/nfs4_set_acl.c b/libnfs4acl/nfs4_set_acl.c index b9edf2b..6c9b072 100644 --- a/libnfs4acl/nfs4_set_acl.c +++ b/libnfs4acl/nfs4_set_acl.c @@ -55,7 +55,7 @@ int nfs4_set_acl(struct nfs4_acl *acl, const char *path) } else if (res < 0) { if (errno == EOPNOTSUPP) fprintf(stderr,"Operation to set ACL not supported.\n"); - else if (errno == ENOATTR) + else if (errno == ENODATA) fprintf(stderr,"ACL Attribute not found on file.\n"); else if (errno == EREMOTEIO) fprintf(stderr,"An NFS server error occurred.\n");