2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

cpuinfo: Fail if cpuinfo check is requested, but file is missing

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
Pavel Emelyanov
2014-10-03 14:42:00 +04:00
parent 003aed3b97
commit 4cfd9197e1

View File

@@ -319,12 +319,8 @@ int cpu_validate_cpuinfo(void)
int ret = -1; int ret = -1;
img = open_image(CR_FD_CPUINFO, O_RSTR | O_OPT); img = open_image(CR_FD_CPUINFO, O_RSTR | O_OPT);
if (!img) { if (!img)
if (errno == ENOENT)
return 0;
else
return -1; return -1;
}
if (pb_read_one(img, &img_cpu_info, PB_CPUINFO) < 0) if (pb_read_one(img, &img_cpu_info, PB_CPUINFO) < 0)
goto err; goto err;