Turn ENOATTR errors into ENODATA errrors
Subsystems (2)
PATCH 1/1 Turn ENOATTR errors into ENODATA errrors
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 <[email protected]>
--- libnfs4acl/nfs4_acl_for_path.c | 2 +- libnfs4acl/nfs4_set_acl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
libnfs4acl/nfs4_acl_for_path.c +1 -1
@@ -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" );
libnfs4acl/nfs4_set_acl.c +1 -1
@@ -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" );
Signature · 1 line
2.17.1
J. Bruce Fields
AppliedApplied, thanks.--b.
Quoted 38 lines · Steve Dickson
The defining of ENOATTR, which was an defined as ENODATA, was removed from the
attr/xattr.hin modern releasesSigned-off-by Steve Dickson <[email protected]>--- libnfs4acl/nfs4_acl_for_path.c | 2 +- libnfs4acl/nfs4_set_acl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)libnfs4acl/nfs4_acl_for_path.c +1
-1@@ -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" );libnfs4acl/nfs4_set_acl.c +1
-1@@ -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" );Signature · 1 line
2.17.1