# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1244339211 10800
# Node ID efdd812a716e949db3c09b54c05fe955cc34fb4a
# Parent 5a873709bd07b283922a09e0ae8c0d6970bea93c
Added support for BusType prop on device_parsing
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 5a873709bd07 -r efdd812a716e libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Sat Jun 06 22:46:42 2009 -0300
+++ b/libxkutil/device_parsing.c Sat Jun 06 22:46:51 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;