Dmitry V. Levin
4176d533e0
* 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.
14 lines
193 B
C
14 lines
193 B
C
#ifdef HAVE_CONFIG_H
|
|
# include "config.h"
|
|
#endif
|
|
#include <sys/statfs.h>
|
|
#include <assert.h>
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
struct statfs stb;
|
|
assert(statfs("/proc/self/status", &stb) == 0);
|
|
return 0;
|
|
}
|