xfs
[Top] [All Lists]

Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD

To: agruen@xxxxxxx, Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
From: Petr Salinger <Petr.Salinger@xxxxxxxxx>
Date: Tue, 9 Jun 2009 13:35:58 +0200 (CEST)
Cc: xfs@xxxxxxxxxxx, Nathan Scott <nscott@xxxxxxxxxx>, 531950-quiet@xxxxxxxxxxxxxxx
In-reply-to: <364917872.6081221244543493694.JavaMail.root@xxxxxxxxxxxxxxxxxx>
References: <364917872.6081221244543493694.JavaMail.root@xxxxxxxxxxxxxxxxxx>
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);
 }

<Prev in Thread] Current Thread [Next in Thread>