libvirt plugin: Fix the HostnameFormat option.
authorRichard Jones <rjones@redhat.com>
Thu, 10 Jan 2008 08:43:32 +0000 (09:43 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 10 Jan 2008 08:43:32 +0000 (09:43 +0100)
commit1df885d0f2d6eb7f9d965b7b0da53e5d78a0a989
treec41cdfc9d8505ba8023edad9244c6879955cd136
parent79b07973208a37d18818541ed6dcdaac8dc35e0f
libvirt plugin: Fix the HostnameFormat option.

The attached patch fixes HostnameFormat in libvirt driver.

The intended use for this was:

   HostnameFormat "name"

generating hostnames like "<guestname>" (the default case), and:

   HostnameFormat "hostname name"

generating hostnames like "<hostname>:<guestname>".

Somewhere along the way, however, that code got broken so it always adds a ":"
before the name, and doesn't concatenate any more, so you'd get weird hostnames
appearing like ":guest" which was supposed to be "hostname:guest".

The patch just reverts back to my original code.

Rich.
src/libvirt.c