File eth-device.patch of Package libvirt-cim

Index: libvirt-cim-0.5.2/libxkutil/device_parsing.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.c
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.c
@@ -312,6 +312,8 @@ static int parse_net_device(xmlNode *ino
                                  ndev->source);
                 } else if (STREQC(ndev->type, "user")){
                         CU_DEBUG("Leaving source blank for user net type");
+                } else if (STREQC(ndev->type, "ethernet")){
+                        CU_DEBUG("Leaving source blank for ethernet net type");
                 } else {
                         /* This likely indicates an unsupported
                          * network configuration
Index: libvirt-cim-0.5.2/libxkutil/xmlgen.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/xmlgen.c
+++ libvirt-cim-0.5.2/libxkutil/xmlgen.c
@@ -272,7 +272,8 @@ static bool net_to_xml(char **xml, struc
                 return network_net_to_xml(xml, dev);
         else if (STREQ(dev->dev.net.type, "bridge"))
                 return bridge_net_to_xml(xml, dev);
-        else if (STREQ(dev->dev.net.type, "user"))
+        else if (STREQ(dev->dev.net.type, "user") ||
+                 STREQ(dev->dev.net.type, "ethernet"))
                 return user_net_to_xml(xml, dev);
         else
                 return false;
openSUSE Build Service is sponsored by