On 22/12/09 10:01, Jim Meyering wrote:
Thanks for the additions and typo fix.
For the ext4-adding part, I'm a little reluctant,
because it may break scripts that test via e.g.,

     test "$(stat -f -c %T .)" = ext2/ext3&&  ...

rather than the more portable -- in potential retrospect:

     case $(stat -f -c %T .) in
         ext2/ext3*) ... ;
     esac

Yes I was a little wary, and I've just noticed:
http://lists.gnu.org/archive/html/bug-coreutils/2009-02/msg00160.html

I'll leave out the ext4 bit for the moment.
I notice df calls read_file_system_list() -> getmntent()
from which mnt_fsname is available, so that might
be a possibility for distinguishing the type.
In fact this might be a more generic way to do it,
negating the need for a static table in stat.c
(which we could fall back to I suppose).

cheers,
Pádraig.


Reply via email to