Re: Add veid argument to vznetcfg [message #7206 is a reply to message #7205] |
Fri, 06 October 2006 12:45 |
Igor Sukhih
Messages: 21 Registered: May 2006
|
Junior Member |
|
|
Kristian F. Høgh wrote:
> Hi list,
>
> As I need the VEID number when bringing up veth interface,
> I changed init to VEID.
> (I have a vlan and bridge for each VE)
>
> vznetcfg init veth <dev>
> vznetcfg <veid> veth <dev>
>
> Best regards,
> Kristian Høgh
> Segtel A/S
>
> ------------------------------------------------------------ ------------
>
> --- a/src/lib/veth.c 2006-10-06 13:09:00.268275416 +0200
> +++ b/src/lib/veth.c 2006-10-06 13:10:50.765528528 +0200
> @@ -93,7 +92,9 @@
> static int run_vznetcfg(envid_t veid, veth_dev *dev)
> {
> int ret;
> - char *argv[] = {VZNETCFG, "init", "veth", NULL, NULL};
> + char veidstr[12];
> + sprintf(veidstr, "%d", veid);
> + char *argv[] = {VZNETCFG, veidstr, "veth", NULL, NULL};
>
> if (stat_file(VZNETCFG) != 1)
> return 0;
>
> ------------------------------------------------------------ ------------
>
Is it Ok for you if I'll pass it in the environment
VEID=xxx
--
Igor.
|
|
|