diff mbox

[v3,03/12] net: eepro100: replace qemu_format_nic_info_str by qemu_format_nic_info_dict

Message ID 1271340427-12579-4-git-send-email-miguel.filho@gmail.com
State New
Headers show

Commit Message

Miguel Di Ciurcio Filho April 15, 2010, 2:06 p.m. UTC
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/eepro100.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

Comments

Richard Henderson April 15, 2010, 3:32 p.m. UTC | #1
On 04/15/2010 07:06 AM, Miguel Di Ciurcio Filho wrote:
> Signed-off-by: Miguel Di Ciurcio Filho<miguel.filho@gmail.com>
> ---
>   hw/eepro100.c |   10 ++++++++--
>   1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/hw/eepro100.c b/hw/eepro100.c
> index 7db6fb5..457bda8 100644
> --- a/hw/eepro100.c
> +++ b/hw/eepro100.c
> @@ -1978,8 +1978,14 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device)
>       s->nic = qemu_new_nic(&net_eepro100_info,&s->conf,
>                             pci_dev->qdev.info->name, pci_dev->qdev.id, s);
>
> -    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
> -    TRACE(OTHER, logout("%s\n", s->nic->nc.info_str));
> +    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
> +
> +#ifdef DEBUG_EEPRO100
> +    QString *qstring;
> +    qstring = qdict_to_qstring(s->nic->nc.info_dict);

This isn't C++ or C99 -- declarations have to come at the start
of a block.  You need to add { } here inside the ifdef.


r~
diff mbox

Patch

diff --git a/hw/eepro100.c b/hw/eepro100.c
index 7db6fb5..457bda8 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1978,8 +1978,14 @@  static int nic_init(PCIDevice *pci_dev, uint32_t device)
     s->nic = qemu_new_nic(&net_eepro100_info, &s->conf,
                           pci_dev->qdev.info->name, pci_dev->qdev.id, s);
 
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
-    TRACE(OTHER, logout("%s\n", s->nic->nc.info_str));
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
+
+#ifdef DEBUG_EEPRO100
+    QString *qstring;
+    qstring = qdict_to_qstring(s->nic->nc.info_dict);
+    TRACE(OTHER, logout("%s\n", qstring_get_str(qstring)));
+    QDECREF(qstring);
+#endif
 
     qemu_register_reset(nic_reset, s);