[PATCH 05/18] virDomainHostdevSubsysSCSIiSCSIDefParseXML: Parse private data of virStorageSource
Ján Tomko
jtomko at redhat.com
Wed Jul 15 21:58:09 UTC 2020
On a Friday in 2020, Peter Krempa wrote:
>We store the config of an iSCSI hostdev in a virStorageSource structure.
>Parse the private data portion.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/conf/domain_conf.c | 39 +++++++++++++++++++++++++++++----------
> 1 file changed, 29 insertions(+), 10 deletions(-)
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index bda9375f13..ceaf73772d 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -8283,7 +8283,9 @@ virDomainHostdevSubsysSCSIHostDefParseXML(xmlNodePtr sourcenode,
> static int
> virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode,
> virDomainHostdevSubsysSCSIPtr def,
>- xmlXPathContextPtr ctxt)
>+ xmlXPathContextPtr ctxt,
>+ unsigned int flags,
>+ virDomainXMLOptionPtr xmlopt)
> {
> int auth_secret_usage = -1;
> xmlNodePtr cur;
>@@ -8348,13 +8350,27 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode,
> }
> cur = cur->next;
> }
>+
>+ if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
Extra parentheses.
>+ xmlopt && xmlopt->privateData.storageParse) {
>+ VIR_XPATH_NODE_AUTORESTORE(ctxt);
>+
>+ ctxt->node = sourcenode;
>+
>+ if ((ctxt->node = virXPathNode("./privateData", ctxt)) &&
>+ xmlopt->privateData.storageParse(ctxt, iscsisrc->src) < 0)
>+ return -1;
>+ }
>+
> return 0;
> }
>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200715/9f76a2c2/attachment-0001.sig>
More information about the libvir-list
mailing list