[CRIU] [PATCH 09/15] opt: cpu-cap -- Introduce "cpuinfo" capability

Cyrill Gorcunov gorcunov at openvz.org
Fri Sep 19 07:03:11 PDT 2014


This will serve testing of cpu instruction level
capability.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 crtools.c            | 4 +++-
 include/cr_options.h | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/crtools.c b/crtools.c
index d15b3addd39b..7aae0878b9f7 100644
--- a/crtools.c
+++ b/crtools.c
@@ -113,6 +113,8 @@ static int parse_cpu_cap(struct cr_options *opts, const char *optarg)
 			____cpu_set_cap(opts, CPU_CAP_ALL, inverse);
 		else if (!strncmp(optarg, "none", 4))
 			____cpu_set_cap(opts, CPU_CAP_NONE, inverse);
+		else if (!strncmp(optarg, "cpuinfo", 7))
+			____cpu_set_cap(opts, CPU_CAP_CPUINFO, inverse);
 		else
 			goto Esyntax;
 	}
@@ -121,7 +123,7 @@ static int parse_cpu_cap(struct cr_options *opts, const char *optarg)
 	return 0;
 
 Esyntax:
-	pr_err("Unknown FPU mode `%s' selected\n", optarg);
+	pr_err("Unknown CPU mode `%s' selected\n", optarg);
 	return -1;
 }
 
diff --git a/include/cr_options.h b/include/cr_options.h
index 617894bac91c..a2b87bdde70d 100644
--- a/include/cr_options.h
+++ b/include/cr_options.h
@@ -9,6 +9,7 @@
  * CPU capability options.
  */
 #define CPU_CAP_FPU		(1u)
+#define CPU_CAP_CPUINFO		(2u)
 #define CPU_CAP_ALL		(-1u)
 #define CPU_CAP_NONE		(0u)
 
-- 
1.9.3



More information about the CRIU mailing list