* src/xen_internal.c: Don't crash if there's no /sys/hypervisor/capabilities

This commit is contained in:
Mark McLoughlin 2008-02-07 10:43:14 +00:00
parent 3d3c8ac4c4
commit a0f83fd905
2 changed files with 6 additions and 1 deletions

View File

@ -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> Thu Feb 7 10:16:42 IST 2008 Mark McLoughlin <markmc@redhat.com>
* src/iptables.c: Create directory for saving iptables rules * src/iptables.c: Create directory for saving iptables rules

View File

@ -2233,7 +2233,7 @@ xenHypervisorMakeCapabilitiesXML(virConnectPtr conn,
*/ */
/* Expecting one line in this file - ignore any more. */ /* 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" /* Split the line into tokens. strtok_r is OK here because we "own"
* this buffer. Parse out the features from each token. * this buffer. Parse out the features from each token.
*/ */