# HG changeset patch
# User Sharad Mishra
# Date 1266951039 28800
# Node ID 0a41b5e876d601216cb3257409eee231b4aec8b0
# Parent 5b37fac8372729a7da9817a8fc0661159fc710b8
Update xml parsing to support vepa.
Signed-off-by: Sharad Mishra<snmishra(a)us.ibm.com>
diff -r 5b37fac83727 -r 0a41b5e876d6 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Thu Jan 28 15:45:31 2010 -0800
+++ b/libxkutil/device_parsing.c Tue Feb 23 10:50:39 2010 -0800
@@ -65,6 +65,7 @@
free(dev->source);
free(dev->model);
free(dev->device);
+ free(dev->net_mode);
}
static void cleanup_emu_device(struct emu_device *dev)
@@ -311,6 +312,10 @@
ndev->source = get_attr_value(child, "network");
if (ndev->source != NULL)
continue;
+ ndev->source = get_attr_value(child, "dev");
+ ndev->net_mode = get_attr_value(child, "mode");
+ if ((ndev->source != NULL)&& (ndev->net_mode !=
NULL))
+ continue;
goto err;
} else if (XSTREQ(child->name, "target")) {
ndev->device = get_attr_value(child, "dev");
@@ -666,6 +671,7 @@
DUP_FIELD(dev, _dev, dev.net.source);
DUP_FIELD(dev, _dev, dev.net.model);
DUP_FIELD(dev, _dev, dev.net.device);
+ DUP_FIELD(dev, _dev, dev.net.net_mode);
} else if (dev->type == CIM_RES_TYPE_DISK) {
DUP_FIELD(dev, _dev, dev.disk.type);
DUP_FIELD(dev, _dev, dev.disk.device);
diff -r 5b37fac83727 -r 0a41b5e876d6 libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Thu Jan 28 15:45:31 2010 -0800
+++ b/libxkutil/device_parsing.h Tue Feb 23 10:50:39 2010 -0800
@@ -51,6 +51,7 @@
char *source;
char *model;
char *device;
+ char *net_mode;
};
struct mem_device {
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim