[CRIU] [PATCH 02/19] compel: uapi -- Add standalone headers

Cyrill Gorcunov gorcunov at openvz.org
Wed Sep 21 13:54:17 PDT 2016


Will be used later.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 compel/include/uapi/compel.h | 27 +++++++++++++++++++++++++++
 compel/include/uapi/int.h    | 15 +++++++++++++++
 compel/include/uapi/types.h  | 16 +---------------
 3 files changed, 43 insertions(+), 15 deletions(-)
 create mode 100644 compel/include/uapi/compel.h
 create mode 100644 compel/include/uapi/int.h
 mode change 100644 => 120000 compel/include/uapi/types.h

diff --git a/compel/include/uapi/compel.h b/compel/include/uapi/compel.h
new file mode 100644
index 000000000000..67b67c476c63
--- /dev/null
+++ b/compel/include/uapi/compel.h
@@ -0,0 +1,27 @@
+#ifndef UAPI_COMPEL_H__
+#define UAPI_COMPEL_H__
+
+#include <errno.h>
+
+#define COMPEL_TYPE_INT		(1u << 0)
+#define COMPEL_TYPE_LONG	(1u << 1)
+#define COMPEL_TYPE_GOTPCREL	(1u << 2)
+
+typedef struct {
+	unsigned int	offset;
+	unsigned int	type;
+	long		addend;
+	long		value;
+} compel_reloc_t;
+
+/*
+ * FIXME: Backward compat layer for CRIU. Need to
+ * drop it later, before the release.
+ */
+
+#define elf_reloc_t		compel_reloc_t
+#define PIEGEN_TYPE_INT		COMPEL_TYPE_INT
+#define PIEGEN_TYPE_LONG	COMPEL_TYPE_LONG
+#define PIEGEN_TYPE_GOTPCREL	COMPEL_TYPE_GOTPCREL
+
+#endif /* UAPI_COMPEL_H__ */
diff --git a/compel/include/uapi/int.h b/compel/include/uapi/int.h
new file mode 100644
index 000000000000..ac3088d5ac3b
--- /dev/null
+++ b/compel/include/uapi/int.h
@@ -0,0 +1,15 @@
+#ifndef __CR_INT_H__
+#define __CR_INT_H__
+
+#include <stdint.h>
+
+typedef uint64_t	u64;
+typedef int64_t		s64;
+typedef uint32_t	u32;
+typedef int32_t		s32;
+typedef uint16_t	u16;
+typedef int16_t		s16;
+typedef uint8_t		u8;
+typedef int8_t		s8;
+
+#endif /* __CR_INT_H__ */
diff --git a/compel/include/uapi/types.h b/compel/include/uapi/types.h
deleted file mode 100644
index 34696e8c6aa5..000000000000
--- a/compel/include/uapi/types.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __PIEGEN_TYPES_H__
-#define __PIEGEN_TYPES_H__
-
-#define PIEGEN_TYPE_INT		(1u << 0)
-#define PIEGEN_TYPE_LONG	(1u << 1)
-#define PIEGEN_TYPE_GOTPCREL	(1u << 2)
-
-typedef struct {
-	unsigned int	offset;
-	unsigned int	type;
-	long		addend;
-	long		value;
-} elf_reloc_t;
-
-#endif /* __PIEGEN_TYPES_H__ */
diff --git a/compel/include/uapi/types.h b/compel/include/uapi/types.h
new file mode 120000
index 000000000000..28c80ee9f7cf
--- /dev/null
+++ b/compel/include/uapi/types.h
@@ -0,0 +1 @@
+compel.h
\ No newline at end of file
-- 
2.7.4



More information about the CRIU mailing list