Re: [PATCH v2] qemu: passt: add support for custom command line arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 07, 2025 at 15:51:51 +0200, Peter Krempa via Devel wrote:
> On Mon, Jul 07, 2025 at 14:52:09 +0200, Enrique Llorente via Devel wrote:

One additional thing ...

> > @@ -24926,6 +24992,7 @@ virDomainNetBackendFormat(virBuffer *buf,
> >                            virDomainNetBackend *backend)
> >  {
> >      g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
> > +    g_auto(virBuffer) childBuf = VIR_BUFFER_INITIALIZER;

.. for child element buffers (where autoindentation is to be used such
as with [1]) you need to use VIR_BUFFER_INIT_CHILD, which propagates the
current autoindent level.

Otherwise autoindent will start at the topmost level.

> >  
> >      if (backend->type) {
> >          virBufferAsprintf(&attrBuf, " type='%s'",
> > @@ -24934,7 +25001,22 @@ virDomainNetBackendFormat(virBuffer *buf,
> >      virBufferEscapeString(&attrBuf, " tap='%s'", backend->tap);
> >      virBufferEscapeString(&attrBuf, " vhost='%s'", backend->vhost);
> >      virBufferEscapeString(&attrBuf, " logFile='%s'", backend->logFile);
> > -    virXMLFormatElement(buf, "backend", &attrBuf, NULL);
> > +
> > +    /* Format passt commandline with namespace */
> > +    if (backend->passtCommandline && backend->passtCommandline->args) {
> > +        virBufferAddLit(&childBuf, "<passt:commandline xmlns:passt='http://libvirt.org/schemas/domain/passt/1.0'>\n");
> > +        virBufferAdjustIndent(&childBuf, 2);

[1]



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux