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

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



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


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