Re: stat vs. -

2009-09-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 9/15/2009 5:49 AM: But couldn't, because stat didn't accept - as meaning standard input. Here's a patch to make it do that (and make the above print what's displayed): This is just FYI. Of course I'll add the usual

Re: stat vs. -

2009-09-29 Thread Jim Meyering
Eric Blake wrote: According to Jim Meyering on 9/15/2009 5:49 AM: But couldn't, because stat didn't accept - as meaning standard input. Here's a patch to make it do that (and make the above print what's displayed): This is just FYI. Of course I'll add the usual NEWS, log and tests and

Re: stat vs. -

2009-09-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 9/29/2009 6:44 AM: stat has two modes of operation: the default is to interpret each argument as a file on which to call stat or lstat. Then there's the --file-system (-f) option. The - == stdin approach makes sense

Re: stat vs. -

2009-09-29 Thread Jim Meyering
Eric Blake wrote: According to Jim Meyering on 9/29/2009 6:44 AM: stat has two modes of operation: the default is to interpret each argument as a file on which to call stat or lstat. Then there's the --file-system (-f) option. The - == stdin approach makes sense for the first case. Since I

Re: stat vs. -

2009-09-29 Thread Eric Blake
Jim Meyering jim at meyering.net writes: But how would you make it work *with* -f? You don't know the path of the file used to create stdin (and in the case of a pipe, there is no path), There is no need for an actual file name, since fstatfs takes a file descriptor. Of course, there's

Re: stat vs. -

2009-09-29 Thread Jim Meyering
Eric Blake wrote: Jim Meyering jim at meyering.net writes: But how would you make it work *with* -f? You don't know the path of the file used to create stdin (and in the case of a pipe, there is no path), There is no need for an actual file name, since fstatfs takes a file descriptor. Of

stat vs. -

2009-09-15 Thread Jim Meyering
In looking at Pádraig's report of a tail test failure with ksh, I wanted to see how ksh pipes differed from bash/zsh ones, by doing this: for i in sh zsh bash ksh; do printf $i: ; $i -c ':|./stat --format=%F -';done sh: fifo zsh: fifo bash: fifo ksh: socket But couldn't, because stat didn't

[PATCH] tests: ls/stat-vs-dirent: avoid spurious test failure

2009-09-05 Thread Jim Meyering
I noticed this test fail when run from this directory: /dev/shm/.j/coreutils-7.5.54-70ea Here's the fix: From c392c4b8ef5de84d67d354bb2ecdd544466c50c8 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Sat, 5 Sep 2009 19:06:31 +0200 Subject: [PATCH] tests: ls/stat-vs-dirent

fix diagnostic in tests/ls/stat-vs-dirent

2006-09-18 Thread Paul Eggert
Here are the symptoms: ./stat-vs-dirent: test failed: /export/duryea: d_ino(42214) != st_ino(2) ./stat-vs-dirent: This may indicate a flaw in your kernel or file system implem\ entation. ./stat-vs-dirent: This flaw won't impact coreutils, but it may well ./stat-vs-dirent: affect other tools