summary refs log tree commit diff stats
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2012-12-05 14:49:11 -0200
committerAndreas Färber <afaerber@suse.de>2012-12-19 14:09:31 +0100
commita404b61244ff555ace0a1360fc22275fbeda503e (patch)
tree214ed2a146754f04aadfca0d97f7fec721bf356b /hw/qdev.c
parent04a2d61e494532260214736ebb0f975822771643 (diff)
downloadfocaccia-qemu-a404b61244ff555ace0a1360fc22275fbeda503e.tar.gz
focaccia-qemu-a404b61244ff555ace0a1360fc22275fbeda503e.zip
qdev-properties.c: Separate core from the code used only by qemu-system-*
This separates the qdev properties code in two parts:
 - qdev-properties.c, that contains most of the qdev properties code;
 - qdev-properties-system.c for code specific for qemu-system-*,
   containing:
   - Property types: drive, chr, netdev, vlan, that depend on code that
     won't be included on *-user
   - qemu_add_globals(), that depends on qemu-config.o.

This change should help on two things:
 - Allowing DeviceState to be used by *-user without pulling
   dependencies that are specific for qemu-system-*;
 - Writing qdev unit tests without pulling too many dependencies.

The copyright/license of qdev-properties.c isn't explicitly stated at
the file, so add a simple copyright/license header pointing to the
commit ID of the original file.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 0f8b87843a..fa0af21b58 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -25,7 +25,6 @@
    inherit from a particular bus (e.g. PCI or I2C) rather than
    this API directly.  */
 
-#include "net.h"
 #include "qdev.h"
 #include "sysemu.h"
 #include "error.h"
@@ -312,19 +311,6 @@ void qdev_connect_gpio_out(DeviceState * dev, int n, qemu_irq pin)
     dev->gpio_out[n] = pin;
 }
 
-void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
-{
-    qdev_prop_set_macaddr(dev, "mac", nd->macaddr.a);
-    if (nd->netdev) {
-        qdev_prop_set_netdev(dev, "netdev", nd->netdev);
-    }
-    if (nd->nvectors != DEV_NVECTORS_UNSPECIFIED &&
-        object_property_find(OBJECT(dev), "vectors", NULL)) {
-        qdev_prop_set_uint32(dev, "vectors", nd->nvectors);
-    }
-    nd->instantiated = 1;
-}
-
 BusState *qdev_get_child_bus(DeviceState *dev, const char *name)
 {
     BusState *bus;