]> xenbits.xensource.com Git - libvirt.git/commit
node device driver: update driver name during dumpxml
authorLaine Stump <laine@laine.org>
Sun, 30 Jun 2013 18:49:21 +0000 (14:49 -0400)
committerroot <root@vlap.laine.org>
Mon, 1 Jul 2013 04:25:21 +0000 (00:25 -0400)
commit374c5e4f73577b316fed19bbcefe74b75195eb95
treeb082482de2aa8e0213db345e8ceda89d97255468
parent49e6a16f8206503c9ff4cd0308dab539cf27a5f8
node device driver: update driver name during dumpxml

This fixes:

  https://bugzilla.redhat.com/show_bug.cgi?id=979290
  https://bugzilla.redhat.com/show_bug.cgi?id=979330

The node device driver was written with the assumption that udev would
use a "change" event to notify libvirt of any change to device status
(including the name of the driver it was bound to). It turns out this
is not the case (see Comment 4 of BZ 979290). That means that a
dumpxml for a device would always show whatever driver happened to be
bound at the time libvirt was started (when the node device cache was
built).

There was already code in the driver (for the benefit of the HAL
backend) that updated the driver name from sysfs each time a device's
info was retrieved from the cache. This patch just enables that manual
update for the udev backend as well.
src/node_device/node_device_driver.c