]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Fix devid init in libxlMakeNicList
authorStefan Bader <stefan.bader@canonical.com>
Wed, 8 Jan 2014 10:39:19 +0000 (11:39 +0100)
committerJim Fehlig <jfehlig@suse.com>
Thu, 9 Jan 2014 02:07:01 +0000 (19:07 -0700)
commite1459c1fe88068f231bad254733b29287c28d517
tree3ee51830c6eb9cdf7172592c17dcf423f7f4ec36
parent8add79a991e6ebc8b5440497e2ada2d1804aec59
libxl: Fix devid init in libxlMakeNicList

This basically reverts commit ba64b97134a6129a48684f22f31be92c3b6eef96
"libxl: Allow libxl to set NIC devid". However assigning devid's
before calling libxlMakeNic does not work as that is calling
libxl_device_nic_init which sets it back to -1.
Right now auto-assignment only works in the hotplug case. But even if
that would be fixed at some point (if that is possible at all), this
would add a weird dependency between Xen and libvirt versions.
The change here should accept any auto-assignment that makes it into
libxl_device_nic_init. My understanding is that a caller always is
allowed to make the devid choice itself. And assuming libxlMakeNicList
is only used on domain creation, a sequential numbering should be ok.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
src/libxl/libxl_conf.c