[CRIU] [PATCH 2/4] Move function definition

Sophie Blee-Goldman ableegoldman at google.com
Fri Aug 8 22:22:07 PDT 2014


Moves the definition of kerndat_init() to below the definition
of get_last_cap(). Needed for reading capabilities in a future patch.

Signed-off-by: Sophie Blee-Goldman <ableegoldman at google.com>

diff --git a/kerndat.c b/kerndat.c
index 2ba1edb..0fee20b 100644
--- a/kerndat.c
+++ b/kerndat.c
@@ -208,6 +208,18 @@ static int init_zero_page_pfn()
 	return ret;
 }
 
+int kern_last_cap;
+
+int get_last_cap(void)
+{
+	struct sysctl_req req[] = {
+		{ "kernel/cap_last_cap", &kern_last_cap, CTL_U32 },
+		{ },
+	};
+
+	return sysctl_op(req, CTL_READ);
+}
+
 int kerndat_init(void)
 {
 	int ret;
@@ -221,18 +233,6 @@ int kerndat_init(void)
 	return ret;
 }
 
-int kern_last_cap;
-
-int get_last_cap(void)
-{
-	struct sysctl_req req[] = {
-		{ "kernel/cap_last_cap", &kern_last_cap, CTL_U32 },
-		{ },
-	};
-
-	return sysctl_op(req, CTL_READ);
-}
-
 int kerndat_init_rst(void)
 {
 	int ret;
-- 
2.0.0.526.g5318336



More information about the CRIU mailing list