[PATCH] headers: Add fs-magic.h

Cyrill Gorcunov gorcunov at openvz.org
Wed Feb 26 01:44:13 PST 2014


Not all distros provide magic numbers we might need
during build procedure, thus provide own definitions
in one known place.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 include/fs-magic.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 include/fs-magic.h

diff --git a/include/fs-magic.h b/include/fs-magic.h
new file mode 100644
index 000000000000..d31a939ba993
--- /dev/null
+++ b/include/fs-magic.h
@@ -0,0 +1,32 @@
+#ifndef __CR_FS_MAGIC_H__
+#define __CR_FS_MAGIC_H__
+
+#include <sys/vfs.h>
+
+/*
+ * Gather magic numbers in case if distros
+ * do not provide appropriate entry in
+ * linux/magic.h.
+ */
+
+#ifndef NFS_SUPER_MAGIC
+# define NFS_SUPER_MAGIC	0x6969
+#endif
+
+#ifndef PIPEFS_MAGIC
+# define PIPEFS_MAGIC		0x50495045
+#endif
+
+#ifndef ANON_INODE_FS_MAGIC
+# define ANON_INODE_FS_MAGIC	0x09041934
+#endif
+
+#ifndef TMPFS_MAGIC
+# define TMPFS_MAGIC		0x01021994
+#endif
+
+#ifndef SOCKFS_MAGIC
+# define SOCKFS_MAGIC		0x534f434b
+#endif
+
+#endif /* __CR_FS_MAGIC_H__ */
-- 
1.8.3.1


--Qxx1br4bt0+wmkIi--


More information about the CRIU mailing list