[CRIU] [PATCH 1/2] headers: Add fs-magic.h
Andrey Wagin
avagin at gmail.com
Wed Feb 26 02:14:12 PST 2014
2014-02-26 13:51 GMT+04:00 Cyrill Gorcunov <gorcunov at openvz.org>:
> 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 | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 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..0fd88118ae1a
> --- /dev/null
> +++ b/include/fs-magic.h
> @@ -0,0 +1,30 @@
> +#ifndef __CR_FS_MAGIC_H__
> +#define __CR_FS_MAGIC_H__
> +
> +/*
> + * Gather magic numbers in case if distros
> + * do not provide appropriate entry in
> + * linux/magic.h.
> + */
Ussualy all these constants are defined in vfs.h, so it must be included here
#include <sys/vfs.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
>
More information about the CRIU
mailing list