[EMAIL PROTECTED] (Eric Blake) writes:
> So do OpenBSD and Solaris warn when -L appears with an
> explicit listing of a broken link?
Solaris does. (Dunno about OpenBSD.) The distinction, I think, is
partly that "ls -L" merely reads ".", whereas "ls -L foo" must
dereference "foo" to see whether
[EMAIL PROTECTED] (Eric Blake) writes:
> What does Solaris 10 do?
Good point. My Solaris 10 host is down right now, but Solaris 9 does
not complain:
54-pete $ ls -l foo
lrwxrwxrwx 1 eggert eggert 7 Feb 26 15:22 foo -> nowhere
55-pete $ /bin/ls -L
eggert.kshh foo
Eric Blake <[EMAIL PROTECTED]> writes:
> And here's the patch. As a nice side effect, it also optimized 'ls -L' to
> avoid stat() (after all, dereferencing makes no sense when all you need is
> file names, and no information from the dereference).
Hmmm, won't that break the behavior on dangling
> Good point. My Solaris 10 host is down right now, but Solaris 9 does
> not complain:
>
>54-pete $ ls -l foo
>lrwxrwxrwx 1 eggert eggert 7 Feb 26 15:22 foo -> nowhere
>55-pete $ /bin/ls -L
>eggert.kshh foo savsmtptemp
>56-pete $ /usr/xpg4/bin/ls -L
>
Eric Blake <[EMAIL PROTECTED]> wrote:
> According to Jim Meyering on 2/25/2006 4:54 AM:
>> Thanks for the suggestion.
>> If this isn't too invasive, I'm interested.
>> I think `ls -i' (without some other option requiring stat info)
>> is used far less often than, say `ls -F', so it's harder to just
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Jim Meyering on 2/25/2006 4:54 AM:
> Thanks for the suggestion.
> If this isn't too invasive, I'm interested.
> I think `ls -i' (without some other option requiring stat info)
> is used far less often than, say `ls -F', so it's harder to j
[EMAIL PROTECTED] (Eric Blake) wrote:
> On platforms with a working dirent.d_ino, 'ls -i' is
> wastefully calling [l]stat() to get the inode number
> rather than using the d_ino obtained from the
> readdir().
>
> The code currently has format_needs_stat and
> format_needs_type; it sounds like we al
On platforms with a working dirent.d_ino, 'ls -i' is
wastefully calling [l]stat() to get the inode number
rather than using the d_ino obtained from the
readdir().
The code currently has format_needs_stat and
format_needs_type; it sounds like we also need
format_needs_inode with the fallback that o