[CRIU] [PATCH 2/2] headers: Use fs-magic.h

Cyrill Gorcunov gorcunov at openvz.org
Wed Feb 26 01:51:30 PST 2014


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 files-reg.c | 5 +----
 files.c     | 9 +--------
 sockets.c   | 5 +----
 3 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/files-reg.c b/files-reg.c
index f90ec726eb87..eccd04ea554d 100644
--- a/files-reg.c
+++ b/files-reg.c
@@ -7,10 +7,6 @@
 #include <sys/vfs.h>
 #include <ctype.h>
 
-#ifndef NFS_SUPER_MAGIC
-#define NFS_SUPER_MAGIC 0x6969
-#endif
-
 /* Stolen from kernel/fs/nfs/unlink.c */
 #define SILLYNAME_PREF ".nfs"
 #define SILLYNAME_SUFF_LEN (((unsigned)sizeof(u64) << 1) + ((unsigned)sizeof(unsigned int) << 1))
@@ -23,6 +19,7 @@
 #include "image.h"
 #include "list.h"
 #include "util.h"
+#include "fs-magic.h"
 #include "asm/atomic.h"
 
 #include "protobuf.h"
diff --git a/files.c b/files.c
index dc3445ee2f3e..e2fb8ebbe730 100644
--- a/files.c
+++ b/files.c
@@ -33,6 +33,7 @@
 #include "namespaces.h"
 #include "tun.h"
 #include "fdset.h"
+#include "fs-magic.h"
 
 #include "parasite.h"
 #include "parasite-syscall.h"
@@ -290,14 +291,6 @@ static int dump_chrdev(struct fd_parms *p, int lfd, const int fdinfo)
 	return do_dump_gen_file(p, lfd, ops, fdinfo);
 }
 
-#ifndef PIPEFS_MAGIC
-#define PIPEFS_MAGIC	0x50495045
-#endif
-
-#ifndef ANON_INODE_FS_MAGIC
-# define ANON_INODE_FS_MAGIC 0x09041934
-#endif
-
 static int dump_one_file(struct parasite_ctl *ctl, int fd, int lfd, struct fd_opts *opts,
 		       const int fdinfo)
 {
diff --git a/sockets.c b/sockets.c
index e2ce240e3b89..36b2378fbfd7 100644
--- a/sockets.c
+++ b/sockets.c
@@ -19,6 +19,7 @@
 #include "sk-packet.h"
 #include "namespaces.h"
 #include "net.h"
+#include "fs-magic.h"
 
 #ifndef NETLINK_SOCK_DIAG
 #define NETLINK_SOCK_DIAG NETLINK_INET_DIAG
@@ -28,10 +29,6 @@
 #define SOCK_DIAG_BY_FAMILY 20
 #endif
 
-#ifndef SOCKFS_MAGIC
-#define SOCKFS_MAGIC	0x534F434B
-#endif
-
 #define SK_HASH_SIZE		32
 
 #ifndef SO_GET_FILTER
-- 
1.8.3.1



More information about the CRIU mailing list