Il 22/05/2012 12:45, Laszlo Ersek 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; - name = u.net->name; + name = u.net->has_name ? u.net->name : NULL; Paolo