On 12/15/2015 09:21 AM, Paolo Bonzini wrote:

> 
> In fact there isn't much shared code in the is_netdev=0 and is_netdev=1
> cases.  Perhaps you could just make a shared function with just
> 
>     if (net_client_init_fun[opts->type](opts, name, peer, errp) < 0) {
>         /* FIXME drop when all init functions store an Error */
>         if (errp && !*errp) {
>             error_setg(errp, QERR_DEVICE_INIT_FAILED,
>                        NetClientOptionsKind_lookup[opts->type]);
>         }
>         return -1;
>     }
> 
> 
> and inline all the rest of net_client_init1, net_visit, net_client_init
> into two functions netdev_add and net_legacy_add.  Then -net handling
> (including HMP) can be moved into a separate file which no one looks at.

There's also some pending patches from qapi refactoring and from
Zoltan's work towards audio unification (which spilled over into netdev
refactoring), which may impact things here.  For my latest version, see:
http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to