[CRIU] [PATCH] cpuinfo: Fail if cpuinfo check is requested, but file is missing

Pavel Emelyanov xemul at parallels.com
Fri Oct 3 03:42:48 PDT 2014


Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 arch/x86/cpu.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/arch/x86/cpu.c b/arch/x86/cpu.c
index 018f551..d0263ab 100644
--- a/arch/x86/cpu.c
+++ b/arch/x86/cpu.c
@@ -319,12 +319,8 @@ int cpu_validate_cpuinfo(void)
 	int ret = -1;
 
 	img = open_image(CR_FD_CPUINFO, O_RSTR | O_OPT);
-	if (!img) {
-		if (errno == ENOENT)
-			return 0;
-		else
-			return -1;
-	}
+	if (!img)
+		return -1;
 
 	if (pb_read_one(img, &img_cpu_info, PB_CPUINFO) < 0)
 		goto err;
-- 
1.8.4.2



More information about the CRIU mailing list