commit | 4176d533e0c0a205aa07e9670c6935cf9bd394a6 | [log] [tgz] |
---|---|---|
author | Dmitry V. Levin <ldv@altlinux.org> | Sun Sep 21 22:42:45 2014 +0000 |
committer | Dmitry V. Levin <ldv@altlinux.org> | Mon Sep 22 00:31:06 2014 +0000 |
tree | 8586ddd59fdef1130588c40b270014988fc9f2c0 | |
parent | 7faa5b488444b798324989df5ebcc614b68477ff [diff] |
fsmagic: sort array by value and use bsearch for faster lookup * defs.h (xlat_search): New prototype. * util.c (xlat_bsearch_compare, xlat_search): New functions. * file.c (sprintfstype): Use xlat_search for fsmagic lookup. * xlat/fsmagic.in: Sort by value and mark as not NULL-terminated. * tests/statfs.c: New file. * tests/statfs.test: New test. * tests/Makefile.am (check_PROGRAMS): Add statfs. (statfs_CFLAGS): Define. (TESTS): Add statfs.test. * tests/.gitignore: Add statfs.