Re: [libvirt] [PATCH] read network config in OpenVZ driver

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

 



On Mon, Sep 08, 2008 at 03:59:55PM +0400, Evgeniy Sokolov wrote:
> This patch add possibility to load network configuration for container  
> in OpenVZ driver.
> It support routing network and bridge devices. This types is currently  
> supported in create/define command.
> Also, patch contain fix to small bug in openvzReadConfigParam method.

  It was too late to add this to 0.4.5 but ...

> @@ -298,10 +442,13 @@ openvzReadConfigParam(int vpsid ,const c
>          if (STREQLEN(line, param, strlen(param))) {
>              sf = line;
>              sf += strlen(param);
> -            if (sf[0] == '=' && (token = strtok_r(sf,"\"\t=\n", &saveptr)) != NULL) {
> -                strncpy(value, token, maxlen) ;
> -                value[maxlen-1] = '\0';
> -                found = 1;
> +            if (sf[0] == '=' && sf[1] != '\0' ) {
> +                sf ++;
> +                if ((token = strtok_r(sf,"\"\t\n", &saveptr)) != NULL) {
> +                    strncpy(value, token, maxlen) ;
> +                    value[maxlen-1] = '\0';
> +                    found = 1;
> +                }
>              }
>         }
>      }

  I commited that bug fix before the release though,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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