Re: [PATCH] openvz: fix bridge devices parsing in openvzReadNetworkConf()

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

 



2011/5/31 Jean-Baptiste Rouault <jean-baptiste.rouault@xxxxxxxxxxx>:
> strchrnul() was called on the wrong string so it returned
> the same result for each iteration.
> ---
> Âsrc/openvz/openvz_conf.c | Â Â2 +-
> Â1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
> index 5f33f75..6e32242 100644
> --- a/src/openvz/openvz_conf.c
> +++ b/src/openvz/openvz_conf.c
> @@ -237,7 +237,7 @@ openvzReadNetworkConf(virDomainDefPtr def,
>
> Â Â Â Â Â Â /*parse string*/
> Â Â Â Â Â Â do {
> - Â Â Â Â Â Â Â Âchar *next = strchrnul (token, ',');
> + Â Â Â Â Â Â Â Âchar *next = strchrnul (p, ',');
> Â Â Â Â Â Â Â Â if (STRPREFIX(p, "ifname=")) {
> Â Â Â Â Â Â Â Â Â Â /* skip in libvirt */
> Â Â Â Â Â Â Â Â } else if (STRPREFIX(p, "host_ifname=")) {
> --
> 1.7.1

ACK and applied, thanks.

I also added a testcase and looked at the other config parsing code in
the OpenVZ driver. I thing that openvzLoadDomains is missing this
line:

  dom->def->virtType = VIR_DOMAIN_VIRT_OPENVZ;

Could you do a virsh dumpxml for an OpenVZ guest and check the first
line of XML? I think it currently reads

  <domain type='qemu'>

but should actually read

  <domain type='openvz'>

and we need to fix this.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]