diff options
author | Jim Meyering <meyering@redhat.com> | 2009-10-08 10:06:42 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-10-08 10:18:28 +0200 |
commit | eb5f06f2a68b3abfe507d9fe527f920ada088688 (patch) | |
tree | 2205d29038ece68a13004a63bcb4bbf4a070f6ba /src/Makefile.am | |
parent | 8e323907160db1cb3f9425204013597c81384492 (diff) | |
download | coreutils-eb5f06f2a68b3abfe507d9fe527f920ada088688.tar.xz |
stat: add support for many more file system types
* src/stat.c (human_fstype): Add the following FS types,
from <linux/magic.h>: afs, anon-inode FS, btrfs, cgroupfs,
cramfs-wend, debugfs, futexfs, inotifyfs, minux3, securityfs,
selinux, xenfs.
Also add "nilfs".
* src/Makefile.am (fs-kernel-magic): New rule.
* NEWS (Bug fixes): Mention this.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 3bba86d9c..0c70914f2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -333,14 +333,16 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false test # Compare fs.h with the list of file system names/magic-numbers in the # Linux statfs man page. This target prints any new name/number pairs. .PHONY: fs-magic-compare -fs-magic-compare: fs-magic fs-def +fs-magic-compare: fs-magic fs-kernel-magic fs-def join -v1 -t@ fs-magic fs-def + join -v1 -t@ fs-kernel-magic fs-def -CLEANFILES += fs-magic fs-def +CLEANFILES += fs-def fs-def: fs.h grep '^# *define ' $< > $@-t && mv $@-t $@ -fs-magic: +CLEANFILES += fs-magic +fs-magic: Makefile man statfs \ |perl -ne '/File system types:/.../Nobody kno/ and print' \ |grep 0x | perl -p \ @@ -357,7 +359,29 @@ fs-magic: -e 's/NTFS_SB/NTFS/;' \ -e 's/^/# define S_MAGIC_/;' \ -e 's,\s*/\* .*? \*/,,;' \ - | grep -v S_MAGIC_EXT3 \ + | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \ + | LC_ALL=C sort \ + > $@-t && mv $@-t $@ + +CLEANFILES += fs-kernel-magic +fs-kernel-magic: Makefile + perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h \ + | perl -p \ + -e 's/MINIX_SUPER_MAGIC\b/MINIX/;' \ + -e 's/MINIX_SUPER_MAGIC2\b/MINIX_30/;' \ + -e 's/MINIX2_SUPER_MAGIC\b/MINIX_V2/;' \ + -e 's/MINIX2_SUPER_MAGIC2\b/MINIX_V2_30/;' \ + -e 's/MINIX3_SUPER_MAGIC\b/MINIX_V3/;' \ + -e 's/(_SUPER)?_MAGIC//;' \ + -e 's/\s+0x(\S+)/" 0x" . uc $$1/e;' \ + -e 's/(\s+0x)(\X{3})\b/$${1}0$$2/;' \ + -e 's/(\s+0x)(\X{6})\b/$${1}00$$2/;' \ + -e 's/(\s+0x)(\X{7})\b/$${1}0$$2/;' \ + -e 's/^#define\s+//;' \ + -e 's/^USBDEVICE/USBDEVFS/;' \ + -e 's/^/# define S_MAGIC_/;' \ + -e 's,\s*/\* .*? \*/,,;' \ + | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \ | LC_ALL=C sort \ > $@-t && mv $@-t $@ |