Commit 4cfd9197 authored by Pavel Emelyanov's avatar Pavel Emelyanov

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

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 003aed3b
...@@ -319,12 +319,8 @@ int cpu_validate_cpuinfo(void) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment