strace/xlat/fsmagic.in
Dmitry V. Levin 4176d533e0 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.
2014-09-22 00:31:06 +00:00

70 lines
2.4 KiB
Plaintext

/* sorted by value, suitable for bsearch(3) */
{ 0x0000002f, "QNX4_SUPER_MAGIC" },
{ 0x00000187, "AUTOFS_SUPER_MAGIC" },
{ 0x00001373, "DEVFS_SUPER_MAGIC" },
{ 0x0000137d, "EXT_SUPER_MAGIC" },
{ 0x0000137f, "MINIX_SUPER_MAGIC" },
{ 0x0000138f, "MINIX_SUPER_MAGIC2" },
{ 0x00001cd1, "DEVPTS_SUPER_MAGIC" },
{ 0x00002468, "MINIX2_SUPER_MAGIC" },
{ 0x00002478, "MINIX2_SUPER_MAGIC2" },
{ 0x00003434, "NILFS_SUPER_MAGIC" },
{ 0x00004d44, "MSDOS_SUPER_MAGIC" },
{ 0x00004d5a, "MINIX3_SUPER_MAGIC" },
{ 0x0000517b, "SMB_SUPER_MAGIC" },
{ 0x0000564c, "NCP_SUPER_MAGIC" },
{ 0x00006969, "NFS_SUPER_MAGIC" },
{ 0x000072b6, "JFFS2_SUPER_MAGIC" },
{ 0x00009660, "ISOFS_SUPER_MAGIC" },
{ 0x00009fa0, "PROC_SUPER_MAGIC" },
{ 0x00009fa1, "OPENPROM_SUPER_MAGIC" },
{ 0x00009fa2, "USBDEVICE_SUPER_MAGIC" },
{ 0x0000adf5, "ADFS_SUPER_MAGIC" },
{ 0x0000adff, "AFFS_SUPER_MAGIC" },
{ 0x0000ef51, "EXT2_OLD_SUPER_MAGIC" },
{ 0x0000ef53, "EXT2_SUPER_MAGIC" },
{ 0x0000f15f, "ECRYPTFS_SUPER_MAGIC" },
{ 0x00011954, "UFS_MAGIC" },
{ 0x0027e0eb, "CGROUP_SUPER_MAGIC" },
{ 0x00414a53, "EFS_SUPER_MAGIC" },
{ 0x00c0ffee, "HOSTFS_SUPER_MAGIC" },
{ 0x01021994, "TMPFS_MAGIC" },
{ 0x01021997, "V9FS_MAGIC" },
{ 0x012fd16d, "XIAFS_SUPER_MAGIC" },
{ 0x012ff7b4, "XENIX_SUPER_MAGIC" },
{ 0x012ff7b5, "SYSV4_SUPER_MAGIC" },
{ 0x012ff7b6, "SYSV2_SUPER_MAGIC" },
{ 0x012ff7b7, "COH_SUPER_MAGIC" },
{ 0x02011994, "SHMFS_SUPER_MAGIC" },
{ 0x09041934, "ANON_INODE_FS_MAGIC" },
{ 0x0bad1dea, "FUTEXFS_SUPER_MAGIC" },
{ 0x11307854, "MTD_INODE_FS_MAGIC" },
{ 0x28cd3d45, "CRAMFS_MAGIC" },
{ 0x42494e4d, "BINFMTFS_MAGIC" },
{ 0x43415d53, "SMACK_MAGIC" },
{ 0x453dcd28, "CRAMFS_MAGIC_WEND" },
{ 0x50495045, "PIPEFS_MAGIC" },
{ 0x52654973, "REISERFS_SUPER_MAGIC" },
{ 0x5346414f, "AFS_SUPER_MAGIC" },
{ 0x534f434b, "SOCKFS_MAGIC" },
{ 0x54190100, "UFS_CIGAM" },
{ 0x57ac6e9d, "STACK_END_MAGIC" },
{ 0x6165676c, "PSTOREFS_MAGIC" },
{ 0x62646576, "BDEVFS_MAGIC" },
{ 0x62656572, "SYSFS_MAGIC" },
{ 0x64626720, "DEBUGFS_MAGIC" },
{ 0x68191122, "QNX6_SUPER_MAGIC" },
{ 0x73636673, "SECURITYFS_MAGIC" },
{ 0x73717368, "SQUASHFS_MAGIC" },
{ 0x73727279, "BTRFS_TEST_MAGIC" },
{ 0x73757245, "CODA_SUPER_MAGIC" },
{ 0x858458f6, "RAMFS_MAGIC" },
{ 0x9123683e, "BTRFS_SUPER_MAGIC" },
{ 0x958458f6, "HUGETLBFS_MAGIC" },
{ 0xabba1974, "XENFS_SUPER_MAGIC" },
{ 0xde5e81e4, "EFIVARFS_MAGIC" },
{ 0xf2f52010, "F2FS_SUPER_MAGIC" },
{ 0xf97cff8c, "SELINUX_MAGIC" },
{ 0xf995e849, "HPFS_SUPER_MAGIC" },
#unterminated