[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] net: convert NetClientState to QOM
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] net: convert NetClientState to QOM |
Date: |
Fri, 19 Oct 2012 09:38:28 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Oct 18, 2012 at 05:06:33PM +0200, Paolo Bonzini wrote:
> Il 18/10/2012 16:56, Stefan Hajnoczi ha scritto:
> >
> > -static NetClientInfo net_tap_win32_info = {
> > - .type = NET_CLIENT_OPTIONS_KIND_TAP,
> > - .size = sizeof(TAPState),
> > - .receive = tap_receive,
> > - .cleanup = tap_cleanup,
> > +#define TYPE_TAP_WIN32_NET_CLIENT "tap-win32-net-client"
> > +
> > +static void tap_win32_net_client_class_init(ObjectClass *klass,
> > + void *class_data)
> > +{
> > + NetClientClass *ncc = NET_CLIENT_CLASS(klass);
> > +
> > + ncc->type_str = "tap";
> > + ncc->receive = tap_receive;
> > + ncc->cleanup = tap_cleanup;
> > +}
> > +
> > +static TypeInfo tap_win32_net_client_info = {
> > + .name = TYPE_TAP_WIN32_NET_CLIENT,
> > + .parent = TYPE_NET_CLIENT,
>
> Why a separate type name than TYPE_NET_CLIENT? It doesn't really matter
> if the client is Unix or Win32.
You are right, there's no need to give UNIX and Win32 unique names. The
QemuOpts they accept are the same already, so I can't think of a
situation where we'd want to distinguish.
Stefan