[libvirt] [PATCH] conf: always format os.bootloaderArgs if set

Martin Kletzander mkletzan at redhat.com
Tue May 31 20:14:32 UTC 2016


On Tue, May 31, 2016 at 08:06:06PM +0200, Fabian Freyer wrote:
>At the moment the bootloader arguments never get formatted if the
>bootloader is unset. However, in cases where the bootloader defaults to
>a default value when unset, specifying bootloader arguments does make
>sense.

Please wrap long lines.  If the bootloader defaults to something, it
should be set to that default.  So NACK to this approach (unless I
missed something).

>---
> src/conf/domain_conf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 568c699..66bba6e 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -22608,6 +22608,8 @@ virDomainDefFormatInternal(virDomainDefPtr def,
>     if (def->os.bootloader) {
>         virBufferEscapeString(buf, "<bootloader>%s</bootloader>\n",
>                               def->os.bootloader);
>+    }
>+    if (def->os.bootloaderArgs) {

the conditions would not be needed, look at how virBufferEscapeString()
works.

>         virBufferEscapeString(buf,
>                               "<bootloader_args>%s</bootloader_args>\n",
>                               def->os.bootloaderArgs);
>--
>2.7.0
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160531/eca99297/attachment-0001.sig>


More information about the libvir-list mailing list