mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9571eaaa63
commit
1ad78434c7
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user