diff --git a/ChangeLog b/ChangeLog index 242dae577b..a17b4b7a55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 7 10:19:12 IST 2008 Mark McLoughlin + + * src/xen_internal.c: Don't crash if there's no + /sys/hypervisor/capabilities + Thu Feb 7 10:16:42 IST 2008 Mark McLoughlin * src/iptables.c: Create directory for saving iptables rules diff --git a/src/xen_internal.c b/src/xen_internal.c index 560f51ca9a..adee7e2ce7 100644 --- a/src/xen_internal.c +++ b/src/xen_internal.c @@ -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. */