]> xenbits.xensource.com Git - libvirt.git/commit
virDomainNetDefFormat: Simplify @sourceAttrBuf handling for some types of VIR_DOMAIN_NET
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 31 Jan 2023 16:35:55 +0000 (17:35 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 1 Feb 2023 07:36:31 +0000 (08:36 +0100)
commit8a652c72b3d534093e7f8431660cec5f68a32ccb
tree634f6b050d0ab5b191ac5e472c5e29270a6348da
parent95c5ff9890335515b6f80b105684f7cd3450390a
virDomainNetDefFormat: Simplify @sourceAttrBuf handling for some types of VIR_DOMAIN_NET

For VIR_DOMAIN_NET_TYPE_{SERVER,CLIENT,MCAST,UDP} we need to put
(optionally) 'address' attribute and 'port' attributes of
<source/> element. But the way we currently do that is
particularly verbose. It can be shortened using
virBufferEscapeString().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/domain_conf.c