bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-6.1: needs 'ls' patch (bug #15043)


From: mwoehlke
Subject: Re: coreutils-6.1: needs 'ls' patch (bug #15043)
Date: Thu, 31 Aug 2006 11:18:07 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.0

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]