[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: |
Jim Meyering |
Subject: |
Re: [PATCH] stat: add support for more file system types |
Date: |
Tue, 22 Dec 2009 11:01:42 +0100 |
Pádraig Brady wrote:
> *src/stat.c (human_fstype): Add the following FS types:
> fuseblk, rpc_pipefs. Also fix a typo of minux3 to minix3
> and add ext4 to the ext2/ext3 name. Also mention the
> fs-magic-compare make target to help update the list.
> * NEWS: Mention the fix.
>
>>From f3953d89bfdeb0d875a9d8347723648a593888f0 Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> Date: Mon, 21 Dec 2009 14:55:17 +0000
> Subject: [PATCH] stat: add support for more file system types
>
> *src/stat.c (human_fstype): Add the following FS types:
> fuseblk, rpc_pipefs. Also fix a typo of minux3 to minix3
> and add ext4 to the ext2/ext3 name. Also mention the
> fs-magic-compare make target to help update the list.
> * NEWS: Mention the fix.
> ---
> NEWS | 3 +++
> src/stat.c | 13 +++++++++----
> 2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 6d71e0f..5791e2e 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -9,6 +9,9 @@ GNU coreutils NEWS -*-
> outline -*-
> a commmand of the above form would fail for all subdirectories.
> [bug introduced in coreutils-8.0]
>
> + stat -f recognizes more file system types: fuseblk, rpc_pipefs.
> + Also minux3 is renamed to minix3 and ext4 is added to the ext2/ext3 name.
...
> case S_MAGIC_EXT2: /* 0xEF53 */
> - return "ext2/ext3";
> + return "ext2/ext3/ext4";
Hi Pádraig,
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