mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
libvirt domain: Allow network drives with no <host> elements.
This is valid for some network drives: <source protocol='rbd' name='abc-def/ghi-jkl'/> instead of this: <source protocol='rbd' name='abc-def/ghi-jkl'> <host name='foo' port='1234'/> </source> Allow both forms.
This commit is contained in:
@@ -541,8 +541,7 @@ for_each_disk (guestfs_h *g,
|
||||
xphost = xmlXPathEvalExpression (BAD_CAST "./source/host",
|
||||
xpathCtx);
|
||||
if (xphost == NULL ||
|
||||
xphost->nodesetval == NULL ||
|
||||
xphost->nodesetval->nodeNr == 0)
|
||||
xphost->nodesetval == NULL)
|
||||
continue;
|
||||
|
||||
/* This gives us a list of <host> elements, which each have a
|
||||
|
||||
Reference in New Issue
Block a user