Hello.
Andreas now takes care ot attr. Btw, the submitter should stop that
stupid GNU wanking - errnos are defined by the kernel so it's a
FreeBSD issues and has nothing to do with their glibc abuse.
Hmm, I'm not sure what you mean there. AIUI, this code
(strerror_ea) is working around Linux's lack of an ENOATTR
error code ... and on FreeBSD there really is an ENOATTR
(and no ENODATA?) Perhaps a better fix in this case may be
to map strerror_ea directly to strerror for all platforms
except Linux?
The problem is that there is no ENODATA errno value defined
on GNU/kFreeBSD. The errno values are determined by kernel,
they are the same as on plain FreeBSD, used libc
implementation does not change it.
Another possibility is to use patch bellow.
Does it looks acceptable for you ?
Thanks
Petr
only in patch2:
unchanged:
--- attr-2.4.43.orig/getfattr/getfattr.c
+++ attr-2.4.43/getfattr/getfattr.c
@@ -93,8 +93,10 @@
const char *strerror_ea(int err)
{
+#ifdef ENODATA
if (err == ENODATA)
return _("No such attribute");
+#endif
return strerror(err);
}
only in patch2:
unchanged:
--- attr-2.4.43.orig/setfattr/setfattr.c
+++ attr-2.4.43/setfattr/setfattr.c
@@ -66,8 +66,10 @@
const char *strerror_ea(int err)
{
+#ifdef ENODATA
if (err == ENODATA)
return _("No such attribute");
+#endif
return strerror(err);
}
|