Il 05/06/2012 22:46, Paolo Bonzini ha scritto:
>> > (1) since both Netdev::id and NetLegacy::name are mandatory now, getting 
>> > the
>> > name for the init functions is cleaner;
> But they shouldn't be mandatory, should they?  ("-net nic -net user"
> should work, and also "-net nic,netdev=foo -netdev user,id=foo").
> 
> Nevertheless it should be as simple as doing
> 
> -        name = u.netdev->id;
> +        name = u.netdev->has_id ? u.netdev->id : NULL;

Oops, id *is* mandatory.

> -        name = u.net->name;
> +        name = u.net->has_name ? u.net->name : NULL;

Still, name is not.

Paolo

Reply via email to