From: Stefan Weil <weil@mail.berlios.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [6216] Add a model string to VLANClientState (Mark McLoughlin)
Date: Wed, 07 Jan 2009 20:23:15 +0100 [thread overview]
Message-ID: <49650123.6010406@mail.berlios.de> (raw)
In-Reply-To: <E1LKcQE-0006eD-0l@cvs.savannah.gnu.org>
Anthony Liguori schrieb:
> Revision: 6216
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6216
> Author: aliguori
> Date: 2009-01-07 17:42:25 +0000 (Wed, 07 Jan 2009)
>
> Log Message:
> -----------
> Add a model string to VLANClientState (Mark McLoughlin)
>
> Don't lose track of what type/model a vlan client is so that we can
> e.g. assign a global per-model id to clients.
>
> The entire patch is basically a tedious excercise in making sure the
> type/model string gets propagated down to qemu_new_vlan_client().
>
> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> Modified Paths:
> --------------
> trunk/hw/e1000.c
> trunk/hw/eepro100.c
> trunk/hw/etraxfs_eth.c
> trunk/hw/mcf_fec.c
> trunk/hw/mipsnet.c
> trunk/hw/musicpal.c
> trunk/hw/ne2000.c
> trunk/hw/pcnet.c
> trunk/hw/rtl8139.c
> trunk/hw/smc91c111.c
> trunk/hw/stellaris_enet.c
> trunk/hw/usb-net.c
> trunk/hw/virtio-net.c
> trunk/net.c
> trunk/net.h
> trunk/sysemu.h
> trunk/tap-win32.c
>
> Modified: trunk/net.c
> ===================================================================
> --- trunk/net.c 2009-01-07 17:40:15 UTC (rev 6215)
> +++ trunk/net.c 2009-01-07 17:42:25 UTC (rev 6216)
> @@ -297,6 +297,7 @@
> #endif
>
> VLANClientState *qemu_new_vlan_client(VLANState *vlan,
> + const char *model,
> IOReadHandler *fd_read,
> IOCanRWHandler *fd_can_read,
> void *opaque)
> @@ -305,6 +306,7 @@
> vc = qemu_mallocz(sizeof(VLANClientState));
> if (!vc)
> return NULL;
> + vc->model = strdup(model);
>
Some targets don't force a value for model, so it can be NULL.
This raises a SIGSEGV crash. Should targets set model, or is
it better to catch this case here?
> vc->fd_read = fd_read;
> vc->fd_can_read = fd_can_read;
> vc->opaque = opaque;
> @@ -325,6 +327,7 @@
> while (*pvc != NULL)
> if (*pvc == vc) {
> *pvc = vc->next;
> + free(vc->model);
> free(vc);
> break;
> } else
>
>
Regards
Stefan Weil
next prev parent reply other threads:[~2009-01-07 19:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 17:42 [Qemu-devel] [6216] Add a model string to VLANClientState (Mark McLoughlin) Anthony Liguori
2009-01-07 19:23 ` Stefan Weil [this message]
2009-01-08 14:45 ` Mark McLoughlin
2009-01-08 14:47 ` [Qemu-devel] [PATCH 1/4] Add qemu_check_nic_model() and qemu_check_nic_model_list() Mark McLoughlin
2009-01-08 14:47 ` [Qemu-devel] [PATCH 2/4] Check NIC model in some NIC init functions Mark McLoughlin
2009-01-08 14:47 ` [Qemu-devel] [PATCH 3/4] Make virtio_net_init() return void Mark McLoughlin
2009-01-08 14:47 ` [Qemu-devel] [PATCH 4/4] Make pci_nic_init() use qemu_setup_nic_model() Mark McLoughlin
2009-01-13 19:25 ` [Qemu-devel] [PATCH 1/3] Check NIC model in some NIC init functions Mark McLoughlin
2009-01-13 19:25 ` [Qemu-devel] [PATCH 2/3] Make virtio_net_init() return void Mark McLoughlin
2009-01-13 19:25 ` [Qemu-devel] [PATCH 3/3] Make pci_nic_init() use qemu_setup_nic_model() Mark McLoughlin
2009-01-13 19:47 ` [Qemu-devel] Re: [PATCH 1/3] Check NIC model in some NIC init functions Anthony Liguori
2009-01-13 20:59 ` Sylvain Petreolle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49650123.6010406@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.