[Top][All Lists]

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

Re: [PATCH] stat: add support for more file system types

From: Pádraig Brady
Subject: Re: [PATCH] stat: add support for more file system types
Date: Tue, 22 Dec 2009 10:18:57 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20091204 Thunderbird/3.0

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*) ... ;

Yes I was a little wary, and I've just noticed:

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).


reply via email to

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