Re: [PATCHv2 2/4] nodeinfo: avoid probing host filesystem during test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/11/2012 06:41 PM, Eric Blake wrote:
We had previously weakened our nodeinfotest in order to ignore parsed
node values, because the parse function was mistakenly relying on
host files.  A better fix is to avoid using the numactl library, but
to instead parse the same files that numactl would read, all while
allowing the files to be relative to our choice of directory.

@@ -317,26 +349,32 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
          virReportSystemError(errno,
                               _("problem reading %s"), sysfs_cpudir);
          closedir(cpudir);
-        return -1;
+        goto cleanup;
+    }
+    if (closedir(cpudir)<  0) {
+        virReportSystemError(errno,
+                             _("problem reading %s"), sysfs_cpudir);

"problem closing %s" ? -- presumably read-errors have been handled previously.

ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]