[CRIU] [PATCH v3] Add directory for common headers
Cyrill Gorcunov
gorcunov at openvz.org
Thu Oct 20 05:10:26 PDT 2016
The idea is to have one place for headers which
are shared between subprojects (zdtm, criu, compel).
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/Makefile | 1 +
criu/action-scripts.c | 2 +-
criu/arch/aarch64/Makefile | 1 +
criu/arch/arm/Makefile | 4 +++-
criu/arch/ppc64/Makefile | 3 ++-
criu/arch/x86/Makefile | 3 ++-
criu/bfd.c | 2 +-
criu/cgroup-props.c | 2 +-
criu/cgroup.c | 2 +-
criu/cr-dump.c | 2 +-
criu/external.c | 2 +-
criu/files-reg.c | 2 +-
criu/files.c | 2 +-
criu/fsnotify.c | 2 +-
criu/include/cr_options.h | 2 +-
criu/include/crtools.h | 2 +-
criu/include/fdinfo.h | 2 +-
criu/include/file-lock.h | 2 +-
criu/include/files.h | 2 +-
criu/include/mount.h | 2 +-
criu/include/namespaces.h | 2 +-
criu/include/net.h | 2 +-
criu/include/page-pipe.h | 2 +-
criu/include/pagemap-cache.h | 2 +-
criu/include/parasite-syscall.h | 2 +-
criu/include/plugin.h | 2 +-
criu/include/posix-timer.h | 2 +-
criu/include/pstree.h | 2 +-
criu/include/rst_info.h | 2 +-
criu/include/sk-inet.h | 2 +-
criu/include/vma.h | 2 +-
criu/netfilter.c | 2 +-
criu/pie/Makefile | 1 +
criu/pie/Makefile.library | 2 +-
criu/plugin.c | 2 +-
criu/proc_parse.c | 2 +-
criu/shmem.c | 2 +-
criu/sk-queue.c | 2 +-
criu/sk-tcp.c | 2 +-
criu/tty.c | 2 +-
criu/util.c | 2 +-
{criu/include => include/common}/list.h | 0
42 files changed, 45 insertions(+), 38 deletions(-)
rename {criu/include => include/common}/list.h (100%)
diff --git a/criu/Makefile b/criu/Makefile
index cf962d4ef4ef..5201022485df 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -10,6 +10,7 @@ export ARCH_DIR PIE_DIR
# General flags.
ccflags-y += -fno-strict-aliasing
ccflags-y += -iquote $(SRC_DIR)/criu/include
+ccflags-y += -iquote $(SRC_DIR)/include
ccflags-y += -iquote $(SRC_DIR)/images
ccflags-y += -iquote $(SRC_DIR)/criu/pie
ccflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)
diff --git a/criu/action-scripts.c b/criu/action-scripts.c
index 2f531a8bb5a9..99662b46e3f4 100644
--- a/criu/action-scripts.c
+++ b/criu/action-scripts.c
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include "cr_options.h"
-#include "list.h"
+#include "common/list.h"
#include "xmalloc.h"
#include "log.h"
#include "servicefd.h"
diff --git a/criu/arch/aarch64/Makefile b/criu/arch/aarch64/Makefile
index 943546a9ff73..c7e141ec2232 100644
--- a/criu/arch/aarch64/Makefile
+++ b/criu/arch/aarch64/Makefile
@@ -2,6 +2,7 @@ builtin-name := crtools.built-in.o
ccflags-y += -iquote $(obj) -iquote $(SRC_DIR)
ccflags-y += -iquote $(obj)/include -iquote $(SRC_DIR)/criu/include
+ccflags-y += -iquote $(SRC_DIR)/include
ccflags-y += -iquote $(SRC_DIR)/compel/plugins/include
ccflags-y += -iquote $(SRC_DIR)/compel/include
diff --git a/criu/arch/arm/Makefile b/criu/arch/arm/Makefile
index a5df78dc35a9..3ceedd7f010f 100644
--- a/criu/arch/arm/Makefile
+++ b/criu/arch/arm/Makefile
@@ -1,6 +1,8 @@
builtin-name := crtools.built-in.o
-ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include -iquote $(SRC_DIR)/criu/include
+ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
+ccflags-y += -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
+
ccflags-y += -iquote $(SRC_DIR)/compel/plugins/include
ccflags-y += -iquote $(SRC_DIR)/compel/include
diff --git a/criu/arch/ppc64/Makefile b/criu/arch/ppc64/Makefile
index a5df78dc35a9..a7b2b7af50f4 100644
--- a/criu/arch/ppc64/Makefile
+++ b/criu/arch/ppc64/Makefile
@@ -1,6 +1,7 @@
builtin-name := crtools.built-in.o
-ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include -iquote $(SRC_DIR)/criu/include
+ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
+ccflags-y += -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
ccflags-y += -iquote $(SRC_DIR)/compel/plugins/include
ccflags-y += -iquote $(SRC_DIR)/compel/include
diff --git a/criu/arch/x86/Makefile b/criu/arch/x86/Makefile
index 841aa9ca882e..6076fcc1862e 100644
--- a/criu/arch/x86/Makefile
+++ b/criu/arch/x86/Makefile
@@ -1,6 +1,7 @@
builtin-name := crtools.built-in.o
-ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include -iquote $(SRC_DIR)/criu/include
+ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
+ccflags-y += -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
ccflags-y += -iquote $(SRC_DIR)/compel/plugins/include
ccflags-y += -iquote $(SRC_DIR)/compel/include
diff --git a/criu/bfd.c b/criu/bfd.c
index 66c318c6ee5b..a65b5531b861 100644
--- a/criu/bfd.c
+++ b/criu/bfd.c
@@ -10,7 +10,7 @@
#include "bug.h"
#include "log.h"
#include "bfd.h"
-#include "list.h"
+#include "common/list.h"
#include "util.h"
#include "xmalloc.h"
#include "asm/page.h"
diff --git a/criu/cgroup-props.c b/criu/cgroup-props.c
index e31d73640fdd..174b98769a75 100644
--- a/criu/cgroup-props.c
+++ b/criu/cgroup-props.c
@@ -15,7 +15,7 @@
#include "xmalloc.h"
#include "string.h"
#include "util.h"
-#include "list.h"
+#include "common/list.h"
#include "log.h"
#include "bug.h"
diff --git a/criu/cgroup.c b/criu/cgroup.c
index 3a0f81f16078..00799be816d8 100644
--- a/criu/cgroup.c
+++ b/criu/cgroup.c
@@ -7,7 +7,7 @@
#include <sys/stat.h>
#include <ftw.h>
#include <libgen.h>
-#include "list.h"
+#include "common/list.h"
#include "xmalloc.h"
#include "cgroup.h"
#include "cgroup-props.h"
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index 280c71350eea..0d3fe3e3416b 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -33,7 +33,7 @@
#include "images/siginfo.pb-c.h"
#include "asm/types.h"
-#include "list.h"
+#include "common/list.h"
#include "imgset.h"
#include "file-ids.h"
#include "kcmp-ids.h"
diff --git a/criu/external.c b/criu/external.c
index c7ff0725258c..d4b443614824 100644
--- a/criu/external.c
+++ b/criu/external.c
@@ -1,5 +1,5 @@
#include "err.h"
-#include "list.h"
+#include "common/list.h"
#include "cr_options.h"
#include "xmalloc.h"
#include "external.h"
diff --git a/criu/files-reg.c b/criu/files-reg.c
index 7817fb4a7940..d808765036c2 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -20,7 +20,7 @@
#include "file-ids.h"
#include "mount.h"
#include "files.h"
-#include "list.h"
+#include "common/list.h"
#include "rst-malloc.h"
#include "fs-magic.h"
#include "asm/atomic.h"
diff --git a/criu/files.c b/criu/files.c
index 6080f99bdc46..b5625f5d0a20 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -18,7 +18,7 @@
#include "files-reg.h"
#include "file-lock.h"
#include "image.h"
-#include "list.h"
+#include "common/list.h"
#include "rst-malloc.h"
#include "util-pie.h"
#include "lock.h"
diff --git a/criu/fsnotify.c b/criu/fsnotify.c
index 87c47d5036a9..c9dade14c5b6 100644
--- a/criu/fsnotify.c
+++ b/criu/fsnotify.c
@@ -35,7 +35,7 @@
#include "files-reg.h"
#include "file-ids.h"
#include "log.h"
-#include "list.h"
+#include "common/list.h"
#include "lock.h"
#include "irmap.h"
#include "cr_options.h"
diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h
index bc10c205cdbb..453071bba3be 100644
--- a/criu/include/cr_options.h
+++ b/criu/include/cr_options.h
@@ -3,7 +3,7 @@
#include <stdbool.h>
-#include "list.h"
+#include "common/list.h"
/*
* CPU capability options.
diff --git a/criu/include/crtools.h b/criu/include/crtools.h
index 2aa5e4adf25a..039d3b659ced 100644
--- a/criu/include/crtools.h
+++ b/criu/include/crtools.h
@@ -3,7 +3,7 @@
#include <sys/types.h>
-#include "list.h"
+#include "common/list.h"
#include "asm/types.h"
#include "servicefd.h"
diff --git a/criu/include/fdinfo.h b/criu/include/fdinfo.h
index 3cabadd7f349..a36e9138beb9 100644
--- a/criu/include/fdinfo.h
+++ b/criu/include/fdinfo.h
@@ -1,7 +1,7 @@
#ifndef __CR_FDINFO_H__
#define __CR_FDINFO_H__
-#include "list.h"
+#include "common/list.h"
#include "images/eventfd.pb-c.h"
#include "images/eventpoll.pb-c.h"
diff --git a/criu/include/file-lock.h b/criu/include/file-lock.h
index d14024ad04d3..5c1bb5b61b89 100644
--- a/criu/include/file-lock.h
+++ b/criu/include/file-lock.h
@@ -1,7 +1,7 @@
#ifndef __FILE_LOCK_H__
#define __FILE_LOCK_H__
-#include "list.h"
+#include "common/list.h"
#include "protobuf.h"
#include "images/file-lock.pb-c.h"
diff --git a/criu/include/files.h b/criu/include/files.h
index 500ecf76ddc6..2ea7116d573e 100644
--- a/criu/include/files.h
+++ b/criu/include/files.h
@@ -7,7 +7,7 @@
#include "asm/types.h"
#include "fcntl.h"
#include "lock.h"
-#include "list.h"
+#include "common/list.h"
#include "pid.h"
#include "rst_info.h"
diff --git a/criu/include/mount.h b/criu/include/mount.h
index 2eb3b0cb86bc..43193ee4792e 100644
--- a/criu/include/mount.h
+++ b/criu/include/mount.h
@@ -4,7 +4,7 @@
#include <sys/types.h>
#include "asm/types.h"
-#include "list.h"
+#include "common/list.h"
struct proc_mountinfo;
struct pstree_item;
diff --git a/criu/include/namespaces.h b/criu/include/namespaces.h
index a163ed14056d..126fd231952c 100644
--- a/criu/include/namespaces.h
+++ b/criu/include/namespaces.h
@@ -3,7 +3,7 @@
#include "compiler.h"
#include "files.h"
-#include "list.h"
+#include "common/list.h"
#ifndef CLONE_NEWNS
#define CLONE_NEWNS 0x00020000
diff --git a/criu/include/net.h b/criu/include/net.h
index ede380fcc6c4..06022be57d9a 100644
--- a/criu/include/net.h
+++ b/criu/include/net.h
@@ -1,7 +1,7 @@
#ifndef __CR_NET_H__
#define __CR_NET_H__
-#include "list.h"
+#include "common/list.h"
struct cr_imgset;
extern int dump_net_ns(int ns_id);
diff --git a/criu/include/page-pipe.h b/criu/include/page-pipe.h
index 3557366a224a..924b162b7449 100644
--- a/criu/include/page-pipe.h
+++ b/criu/include/page-pipe.h
@@ -2,7 +2,7 @@
#define __CR_PAGE_PIPE_H__
#include <sys/uio.h>
-#include "list.h"
+#include "common/list.h"
#define PAGE_ALLOC_COSTLY_ORDER 3 /* from the kernel source code */
struct kernel_pipe_buffer {
diff --git a/criu/include/pagemap-cache.h b/criu/include/pagemap-cache.h
index e0880906d74f..3b861259769e 100644
--- a/criu/include/pagemap-cache.h
+++ b/criu/include/pagemap-cache.h
@@ -5,7 +5,7 @@
#include "asm/page.h"
#include "asm/int.h"
-#include "list.h"
+#include "common/list.h"
struct vma_area;
diff --git a/criu/include/parasite-syscall.h b/criu/include/parasite-syscall.h
index 5e8ee02304c2..a416974b9b06 100644
--- a/criu/include/parasite-syscall.h
+++ b/criu/include/parasite-syscall.h
@@ -3,7 +3,7 @@
#include "asm/types.h"
#include "pid.h"
-#include "list.h"
+#include "common/list.h"
#include "config.h"
#define BUILTIN_SYSCALL_SIZE 8
diff --git a/criu/include/plugin.h b/criu/include/plugin.h
index 2855836206d9..2b02edb246d5 100644
--- a/criu/include/plugin.h
+++ b/criu/include/plugin.h
@@ -3,7 +3,7 @@
#include "criu-plugin.h"
#include "compiler.h"
-#include "list.h"
+#include "common/list.h"
#define CR_PLUGIN_DEFAULT "/var/lib/criu/"
diff --git a/criu/include/posix-timer.h b/criu/include/posix-timer.h
index 568bf4a27e9d..fa99d8628edd 100644
--- a/criu/include/posix-timer.h
+++ b/criu/include/posix-timer.h
@@ -1,7 +1,7 @@
#ifndef __CR_PROC_POSIX_TIMER_H__
#define __CR_PROC_POSIX_TIMER_H__
-#include "list.h"
+#include "common/list.h"
struct str_posix_timer {
long it_id;
diff --git a/criu/include/pstree.h b/criu/include/pstree.h
index 17b803584221..3bf362303b44 100644
--- a/criu/include/pstree.h
+++ b/criu/include/pstree.h
@@ -1,7 +1,7 @@
#ifndef __CR_PSTREE_H__
#define __CR_PSTREE_H__
-#include "list.h"
+#include "common/list.h"
#include "pid.h"
#include "images/core.pb-c.h"
diff --git a/criu/include/rst_info.h b/criu/include/rst_info.h
index 995dc303d118..71110a147ffe 100644
--- a/criu/include/rst_info.h
+++ b/criu/include/rst_info.h
@@ -2,7 +2,7 @@
#define __CR_RST_INFO_H__
#include "lock.h"
-#include "list.h"
+#include "common/list.h"
#include "vma.h"
struct task_entries {
diff --git a/criu/include/sk-inet.h b/criu/include/sk-inet.h
index 772a663ff65b..326d1b92a466 100644
--- a/criu/include/sk-inet.h
+++ b/criu/include/sk-inet.h
@@ -5,7 +5,7 @@
#include "sockets.h"
#include "files.h"
-#include "list.h"
+#include "common/list.h"
#include "protobuf.h"
#include "images/sk-inet.pb-c.h"
diff --git a/criu/include/vma.h b/criu/include/vma.h
index 88d4e2ba948c..301822e22c5e 100644
--- a/criu/include/vma.h
+++ b/criu/include/vma.h
@@ -3,7 +3,7 @@
#include "asm/types.h"
#include "image.h"
-#include "list.h"
+#include "common/list.h"
#include "images/vma.pb-c.h"
diff --git a/criu/netfilter.c b/criu/netfilter.c
index bb64148b3df9..72a2f184b6ff 100644
--- a/criu/netfilter.c
+++ b/criu/netfilter.c
@@ -7,7 +7,7 @@
#include "asm/types.h"
#include "util.h"
-#include "list.h"
+#include "common/list.h"
#include "files.h"
#include "netfilter.h"
#include "sockets.h"
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index 420bb42e21ae..f8124b8d931e 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -49,6 +49,7 @@ CFLAGS := $(filter-out -DCONFIG_X86_64,$(CFLAGS))
CFLAGS += -iquote $(SRC_DIR)/compel/include
CFLAGS += -iquote $(SRC_DIR)/criu/arch/$(ARCH)/include
CFLAGS += -iquote $(SRC_DIR)/criu/include
+CFLAGS += -iquote $(SRC_DIR)/include
CFLAGS += -iquote $(SRC_DIR)
ccflags-y += -iquote $(SRC_DIR)/compel/plugins/include
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index ea72c28b147a..70378ba738ae 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -58,7 +58,7 @@ $(eval $(call map,gen-compat-objs,$(OBJS)))
#
iquotes := -iquote $(SRC_DIR)/$(PIE_DIR)/piegen
iquotes += -iquote $(SRC_DIR)/$(ARCH_DIR)/include
-iquotes += -iquote $(SRC_DIR) -iquote $(SRC_DIR)/criu/include
+iquotes += -iquote $(SRC_DIR) -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
CFLAGS := $(filter-out -pg $(CFLAGS-GCOV),$(CFLAGS)) $(iquotes)
asflags-y := -D__ASSEMBLY__ $(iquotes)
ccflags-y += -iquote $(SRC_DIR)/compel/plugins/include
diff --git a/criu/plugin.c b/criu/plugin.c
index 567815ac1118..54cd4257b049 100644
--- a/criu/plugin.c
+++ b/criu/plugin.c
@@ -10,7 +10,7 @@
#include "compiler.h"
#include "xmalloc.h"
#include "plugin.h"
-#include "list.h"
+#include "common/list.h"
#include "log.h"
cr_plugin_ctl_t cr_plugin_ctl = {
diff --git a/criu/proc_parse.c b/criu/proc_parse.c
index ca6087ca6188..c82025ab9e8d 100644
--- a/criu/proc_parse.c
+++ b/criu/proc_parse.c
@@ -11,7 +11,7 @@
#include <linux/fs.h>
#include "asm/types.h"
-#include "list.h"
+#include "common/list.h"
#include "util.h"
#include "mount.h"
#include "filesystems.h"
diff --git a/criu/shmem.c b/criu/shmem.c
index ebd22ecb3b72..5710f357940d 100644
--- a/criu/shmem.c
+++ b/criu/shmem.c
@@ -4,7 +4,7 @@
#include <fcntl.h>
#include <stdbool.h>
-#include "list.h"
+#include "common/list.h"
#include "pid.h"
#include "shmem.h"
#include "image.h"
diff --git a/criu/sk-queue.c b/criu/sk-queue.c
index 50854d7d07ae..fee6d6cbdcec 100644
--- a/criu/sk-queue.c
+++ b/criu/sk-queue.c
@@ -11,7 +11,7 @@
#include <sys/sendfile.h>
#include "asm/types.h"
-#include "list.h"
+#include "common/list.h"
#include "imgset.h"
#include "image.h"
#include "servicefd.h"
diff --git a/criu/sk-tcp.c b/criu/sk-tcp.c
index 46b59ceef0f1..da1a85efa40c 100644
--- a/criu/sk-tcp.c
+++ b/criu/sk-tcp.c
@@ -10,7 +10,7 @@
#include "cr_options.h"
#include "util.h"
-#include "list.h"
+#include "common/list.h"
#include "log.h"
#include "asm/types.h"
#include "files.h"
diff --git a/criu/tty.c b/criu/tty.c
index e09b8f64c6dc..31db54bf6d21 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -22,7 +22,7 @@
#include "servicefd.h"
#include "rst-malloc.h"
#include "log.h"
-#include "list.h"
+#include "common/list.h"
#include "util-pie.h"
#include "proc_parse.h"
#include "file-ids.h"
diff --git a/criu/util.c b/criu/util.c
index c44d900c66ed..95817c32a874 100644
--- a/criu/util.c
+++ b/criu/util.c
@@ -37,7 +37,7 @@
#include "compiler.h"
#include "asm/types.h"
-#include "list.h"
+#include "common/list.h"
#include "util.h"
#include "rst-malloc.h"
#include "image.h"
diff --git a/criu/include/list.h b/include/common/list.h
similarity index 100%
rename from criu/include/list.h
rename to include/common/list.h
--
2.7.4
More information about the CRIU
mailing list