# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1244396373 10800
# Node ID d733a0ec8e105c7d315ffefdbfbb900a8e24d857
# Parent 981877c297fc9ca382d2c9bb83b9653317900641
Added support for BusType prop on device_parsing
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
imported patch dbus_type_parse
diff -r 981877c297fc -r d733a0ec8e10 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Sun Jun 07 14:39:24 2009 -0300
+++ b/libxkutil/device_parsing.c Sun Jun 07 14:39:33 2009 -0300
@@ -59,6 +59,7 @@
free(dev->driver);
free(dev->source);
free(dev->virtual_dev);
+ free(dev->bus_type);
}
static void cleanup_net_device(struct net_device *dev)
@@ -246,6 +247,7 @@
ddev->virtual_dev = get_attr_value(child, "dev");
if (ddev->virtual_dev == NULL)
goto err;
+ ddev->bus_type = get_attr_value(child, "bus");
} else if (XSTREQ(child->name, "readonly")) {
ddev->readonly = true;
} else if (XSTREQ(child->name, "shareable")) {
@@ -666,6 +668,7 @@
DUP_FIELD(dev, _dev, dev.disk.driver);
DUP_FIELD(dev, _dev, dev.disk.source);
DUP_FIELD(dev, _dev, dev.disk.virtual_dev);
+ DUP_FIELD(dev, _dev, dev.disk.bus_type);
dev->dev.disk.disk_type = _dev->dev.disk.disk_type;
dev->dev.disk.readonly = _dev->dev.disk.readonly;
dev->dev.disk.shareable = _dev->dev.disk.shareable;