]> xenbits.xensource.com Git - libvirt.git/commitdiff
* src/xen_internal.c: Don't crash if there's no /sys/hypervisor/capabilities
authorMark McLoughlin <markmc@redhat.com>
Thu, 7 Feb 2008 10:43:14 +0000 (10:43 +0000)
committerMark McLoughlin <markmc@redhat.com>
Thu, 7 Feb 2008 10:43:14 +0000 (10:43 +0000)
ChangeLog
src/xen_internal.c

index 242dae577b4a3370dccc68fa524f0df649d2e93d..a17b4b7a5571d4dd7a0e3f9a7d0fb816768dee41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb  7 10:19:12 IST 2008 Mark McLoughlin <markmc@redhat.com>
+
+       * src/xen_internal.c: Don't crash if there's no
+       /sys/hypervisor/capabilities
+
 Thu Feb  7 10:16:42 IST 2008 Mark McLoughlin <markmc@redhat.com>
 
        * src/iptables.c: Create directory for saving iptables rules
index 560f51ca9a0a90a78cf409f8cbc2e916f0c2525f..adee7e2ce70e333c37069aab6cbe88adf3df272e 100644 (file)
@@ -2233,7 +2233,7 @@ xenHypervisorMakeCapabilitiesXML(virConnectPtr conn,
      */
 
     /* Expecting one line in this file - ignore any more. */
-    if (fgets (line, sizeof line, capabilities)) {
+    if ((capabilities) && (fgets (line, sizeof line, capabilities))) {
         /* Split the line into tokens.  strtok_r is OK here because we "own"
          * this buffer.  Parse out the features from each token.
          */