[CRIU] [PATCH 4/7] cg: Skeleton for cgroup code
Pavel Emelyanov
xemul at parallels.com
Thu May 8 06:08:17 PDT 2014
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
Makefile.crtools | 1 +
cgroup.c | 16 ++++++++++++++++
cr-dump.c | 1 +
cr-restore.c | 1 +
image.c | 1 +
include/cgroup.h | 4 ++++
6 files changed, 24 insertions(+)
create mode 100644 cgroup.c
create mode 100644 include/cgroup.h
diff --git a/Makefile.crtools b/Makefile.crtools
index 619e9a0..b9bb1b5 100644
--- a/Makefile.crtools
+++ b/Makefile.crtools
@@ -56,6 +56,7 @@ obj-y += page-read.o
obj-y += pagemap-cache.o
obj-y += kerndat.o
obj-y += stats.o
+obj-y += cgroup.o
obj-y += string.o
obj-y += sigframe.o
obj-y += $(ARCH_DIR)/vdso.o
diff --git a/cgroup.c b/cgroup.c
new file mode 100644
index 0000000..c9ac9d1
--- /dev/null
+++ b/cgroup.c
@@ -0,0 +1,16 @@
+#define LOG_PREFIX "cg: "
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/mount.h>
+#include <sys/stat.h>
+#include "xmalloc.h"
+#include "cgroup.h"
+#include "pstree.h"
+#include "proc_parse.h"
+#include "util.h"
+#include "fdset.h"
+#include "protobuf.h"
+#include "protobuf/core.pb-c.h"
+#include "protobuf/cgroup.pb-c.h"
diff --git a/cr-dump.c b/cr-dump.c
index 86351e5..ef401ab 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -58,6 +58,7 @@
#include "sk-packet.h"
#include "cpu.h"
#include "elf.h"
+#include "cgroup.h"
#include "file-lock.h"
#include "page-xfer.h"
#include "kerndat.h"
diff --git a/cr-restore.c b/cr-restore.c
index d79da59..e9af4e6 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -68,6 +68,7 @@
#include "kerndat.h"
#include "rst-malloc.h"
#include "plugin.h"
+#include "cgroup.h"
#include "parasite-syscall.h"
diff --git a/image.c b/image.c
index 307c8be..d503321 100644
--- a/image.c
+++ b/image.c
@@ -7,6 +7,7 @@
#include "image.h"
#include "pstree.h"
#include "stats.h"
+#include "cgroup.h"
#include "protobuf.h"
#include "protobuf/inventory.pb-c.h"
#include "protobuf/pagemap.pb-c.h"
diff --git a/include/cgroup.h b/include/cgroup.h
new file mode 100644
index 0000000..ecf5590
--- /dev/null
+++ b/include/cgroup.h
@@ -0,0 +1,4 @@
+#ifndef __CR_CGROUP_H__
+#define __CR_CGROUP_H__
+#include "asm/int.h"
+#endif /* __CR_CGROUP_H__ */
--
1.8.4.2
More information about the CRIU
mailing list