[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
- From: Jim Paris <jim jtan com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
- Date: Wed, 30 Apr 2008 00:29:18 -0400
Daniel P. Berrange wrote:
> This patch finishes off the work from Rich / Soren to support network
> interface model in both Xen and QEMU drivers, and adds test cases for
> the new syntax
I still think our consensus from when I posted this patch last year
(<nic model=...>) makes more sense ... but getting any form of this
patch upstream sounds good to me.
> - if (snprintf(nic, sizeof(nic), "nic,macaddr=%02x:%02x:%02x:%02x:%02x:%02x,vlan=%d",
> + if (net->model[0] != '\0') {
> + if (snprintf (model, sizeof (model), ",model=%s", net->model)
> + >= sizeof (model))
> + goto error;
> + } else
> + model[0] = '\0';
> +
> + if (snprintf(nic, sizeof(nic),
> + "nic,macaddr=%02x:%02x:%02x:%02x:%02x:%02x,vlan=%d%s",
> net->mac[0], net->mac[1],
> net->mac[2], net->mac[3],
> net->mac[4], net->mac[5],
> - vlan) >= sizeof(nic))
> + vlan, model) >= sizeof(nic))
You could simplify this and not require the temporary buffer if you do
it this way:
http://www.mail-archive.com/libvir-list redhat com/msg03557.html
-jim
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]