xfs
[Top] [All Lists]

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

To: Petr Salinger <Petr.Salinger@xxxxxxxxx>
Subject: Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
From: Aurelien Jarno <aurelien@xxxxxxxxxxx>
Date: Mon, 15 Jun 2009 12:05:58 +0200
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, 531950-quiet@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, Nathan Scott <nscott@xxxxxxxxxx>
In-reply-to: <Pine.LNX.4.62.0906151211550.15794@xxxxxxxxxxxxxxxx>
References: <364917872.6081221244543493694.JavaMail.root@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.62.0906091328270.31325@xxxxxxxxxxxxxxxx> <20090609121042.GA28666@xxxxxxxxxxxxx> <20090614163517.GA19259@xxxxxxxxxxxxxxxxx> <20090614203309.GA1929@xxxxxxxxxxxxx> <20090614205628.GB25535@xxxxxxxxxxxxxxxx> <20090615094244.GA4793@xxxxxxxxxxxxx> <Pine.LNX.4.62.0906151211550.15794@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Jun 15, 2009 at 12:26:12PM +0200, Petr Salinger wrote:
>> On Sun, Jun 14, 2009 at 10:56:28PM +0200, Aurelien Jarno wrote:
>>> Would such a patch be accepted more easily than the ENODATA patch?
>>
>> I don't think it's an except but in addition.  Wherever we do a strerror
>> in the attr code we will have to special case ENODATA on Linux and only
>> there.  Independent of that I think we would better of using the raw
>> syscalls in platforms already using binary namespaces rather than double
>> translation.  Note that this is only applicable for the IRIX-heritage
>> attr_* routines exports by libattr, not the *xattr routines it also
>> exports.
>
> We would really appreciate to have either "#ifdef ENODATA" or
> "#ifdef __linux__" applied to current debian version of package.
> The debian maintainer does not want to diverge from (future) upstream,
> which is quite understandable.
>

> Would be possible to special case ENODATA as 1st step and postpone
> adding of syscall support later ?

Fully agreed.

Please find below the __linux_ version of the patch.

--- 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 __linux__
        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 __linux__
        if (err == ENODATA)
                return _("No such attribute");
+#endif
        return strerror(err);
 }
 
-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@xxxxxxxxxxx                 http://www.aurel32.net

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