Commit 7b71e03a authored by Thomas Huth's avatar Thomas Huth Committed by Laurent Vivier
Browse files

net: Print output of "-net nic, model=help" to stdout instead of stderr

We are printing all other help output to stdout already (e.g. "-help",
"-cpu help" and "-machine help" output). So the "-net nic,model=help"
output should go to stdout instead of stderr, too. And while we're at
it, also print the NICs line by line, like we do it e.g. with the
"-cpu help" or "-M help" output, too.

Buglink: https://bugs.launchpad.net/qemu/+bug/1574327


Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190423160608.7519-1-thuth@redhat.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 86031728
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -837,9 +837,10 @@ int qemu_show_nic_models(const char *arg, const char *const *models)
        return 0;
    }

    fprintf(stderr, "qemu: Supported NIC models: ");
    for (i = 0 ; models[i]; i++)
        fprintf(stderr, "%s%c", models[i], models[i+1] ? ',' : '\n');
    printf("Supported NIC models:\n");
    for (i = 0 ; models[i]; i++) {
        printf("%s\n", models[i]);
    }
    return 1;
}