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:
@@ -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 -1;
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
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;
|
||||||
|
Reference in New Issue
Block a user