mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
* src/xen_internal.c: Don't crash if there's no /sys/hypervisor/capabilities
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user