[CRIU] [PATCH 04/12] dump: convert fd types into enum
Kinsbursky Stanislav
skinsbursky at openvz.org
Fri Mar 23 12:23:31 EDT 2012
From: Stanislav Kinsbursky <skinsbursky at openvz.org>
This is a precursor patch. Macro for max possible fd type will be required.
And it's easier to use enum in this case.
Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
---
include/image.h | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
-------------- next part --------------
diff --git a/include/image.h b/include/image.h
index bf77d77..5b76a67 100644
--- a/include/image.h
+++ b/include/image.h
@@ -29,12 +29,16 @@
#define PIPEFS_MAGIC 0x50495045
-#define FDINFO_REG 1
-#define FDINFO_MAP 2
+enum fd_types {
+ FDINFO_UND,
+ FDINFO_REG,
+ FDINFO_MAP,
-/* Specials */
-#define FDINFO_CWD 3
-#define FDINFO_EXE 4
+ FDINFO_CWD,
+ FDINFO_EXE,
+
+ FD_INFO_MAX
+};
#define PAGE_IMAGE_SIZE 4096
#define PAGE_RSS 1
More information about the CRIU
mailing list