提交 1ad78434 编写于 作者: M Michal Privoznik

nodeinfotest: Print error if cpuinfo file can't be opened

Currently, we are opening the cpuinfo file via fopen() which if fails
doesn't print any error message. We should do that instead.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 9571eaaa
......@@ -39,8 +39,11 @@ linuxTestCompareFiles(const char *cpuinfofile,
goto fail;
cpuinfo = fopen(cpuinfofile, "r");
if (!cpuinfo)
if (!cpuinfo) {
fprintf(stderr, "unable to open: %s : %s\n",
cpuinfofile, strerror(errno));
goto fail;
}
memset(&nodeinfo, 0, sizeof(nodeinfo));
if (linuxNodeInfoCPUPopulate(cpuinfo, sysfs_dir, arch, &nodeinfo) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册