]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: Use filter arg of scandir* to pickup /etc/fstab.d/*.fstab files
authorMasatake YAMATO <yamato@redhat.com>
Thu, 19 Jan 2012 04:28:41 +0000 (13:28 +0900)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Jan 2012 12:53:40 +0000 (13:53 +0100)
commit9deeef8e47bf204298f346a54011c491b2480b0a
tree7d687d3c96d97b1e14e5fc8d7980192d92de52f5
parent485a8bfa98f8d89855b7ae0305e6698048c6f050
libmount: Use filter arg of scandir* to pickup /etc/fstab.d/*.fstab files

This patch is based on my last patch:

     [PATCH 1/2] scandirat based mnt_table_parse_dir implementation

scandir* used in `mnt_table_parse_dir in libmount/src/tab_parse.c
can take filter function as an argument.

`mnt_table_parse_dir' picks up fstab files from namelist returned from
scandir* for itself. However, some parts of picking-up job can be done
in the filter function.

This patch introduces a new function `mnt_table_parse_dir_filter' to
share the code for picking-up job between two implementations of
`mnt_table_parse_dir_filter', scandir based and scandirat based.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
libmount/src/tab_parse.c