Eric Blake <ebl...@redhat.com> writes: > On 05/12/2015 06:02 AM, Markus Armbruster wrote: >> When -net nic fails, it first reports a specific error, then a generic >> one, like this: >> >> $ qemu-system-x86_64 -net nic,netdev=nonexistant >> qemu-system-x86_64: -net nic,netdev=nonexistant: netdev >> nonexistant' not found >> qemu-system-x86_64: -net nic,netdev=nonexistant: Device 'nic' >> could not be initialized > > s/nonexistant/nonexistent/g
Fixing... >> >> Convert net_init_nic() to Error to get rid of the unwanted second >> error message. >> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> >> --- >> net/net.c | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> > >> @@ -745,7 +744,7 @@ static int net_init_nic(const NetClientOptions *opts, >> const char *name, >> >> idx = nic_get_free_idx(); >> if (idx == -1 || nb_nics >= MAX_NICS) { >> - error_report("Too Many NICs"); >> + error_setg(errp, "Too Many NICs"); > > worth s/Many/many/ while touching this? Yup. > Reviewed-by: Eric Blake <ebl...@redhat.com> Thanks!