common/rc: add generic file type support check
authorAmir Goldstein <amir73il@gmail.com>
Tue, 20 Dec 2016 13:17:34 +0000 (15:17 +0200)
committerEryu Guan <eguan@redhat.com>
Sat, 24 Dec 2016 12:21:55 +0000 (20:21 +0800)
commitd0d42a38211cfaea9db5a8b6a8ea4e1f5e2d2fa2
tree99708215ed5d515e13a2ac45dd0a892139b47d1e
parent9aead226d3307ee47a9658cfc78b4ba09b0eb674
common/rc: add generic file type support check

_supports_filetype() helper checks if the filetype feature
is enabled for xfs and ext* file sytems.

Add a check for the generic case where we don't know
how to test file system filetype feature.

Introduce a helper utility t_dir_type that lists directory
entries filtered by file type.

Check for filetype feature by expecting to find no directory
entries listed as DT_UNKNOWN inside a test directory.

[eguan: declare temp vars as local]

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
.gitignore
common/rc
src/Makefile
src/t_dir_type.c [new file with mode: 0644]