[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils-bug
Subject:    Re: coreutils-6.1: needs 'ls' patch (bug #15043)
From:       mwoehlke <mwoehlke () tibco ! com>
Date:       2006-08-31 16:18:07
Message-ID: ed723v$sve$1 () sea ! gmane ! org
[Download RAW message or body]

Eric Blake wrote:
> According to mwoehlke on 8/28/2006 9:58 AM:
>>> I don't see why the behavior of 'ls' should depend on whether the
>>> Linux kernel is used.  Shouldn't coreutils 'ls' behave the same way on
>>> FreeBSD or Solaris?
>> The *old* behavior depends on the kernel. Although I can't vouch for
>> FreeBSD, I tested on Solaris (both SPARC 2.6 and x86 10) and several
>> other platforms, and in 5.97 / 6.1, Linux was the *only* platform I
>> tested on which it did not work. All of which is in the Savannah comments.
>>
>> I #ifdef'd the change to avoid doing unnecessary work on platforms that
>> work correctly without the extra call.
> 
> Look more closely at the code.  The reason linux was failing was because
> it was not doing enough work, because the d_type shortcut let it skip a
> stat where one was needed.  Platforms that did not have the bug are not
> doing extra work, because they have already done the stat (not having a
> d_type shortcut to rely on).  So #ifdef'ing on linux is not the right
> approach, and Jim's patch was appropriate.

Ok, so if I am understanding correctly, you are saying that on 
not-Linux, one of the other conditions in the 'if' will always cause the 
block to be evaluated?

-- 
Matthew
We apologize for the inconvenience.




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic