• M
    net: Improve error message for -net hubport a bit · ca7eb184
    Markus Armbruster 提交于
    Type "hubport" is valid only with -netdev.  Unfortunately, that's
    detected late and the error message doesn't explain why:
    
        $ qemu-system-i386 -net hubport,id=foo,hubid=0
        qemu-system-i386: -net hubport,id=foo,hubid=0: Device 'hubport' could not be initialized
    
    Improve the error message to "Parameter 'type' expects a net type".
    
    Not fixed: -net hubport without the parameters required by -netdev
    hubport still asks for those parameters:
    
        $ qemu-system-i386 -net hubport
        qemu-system-i386: -net hubport: Parameter 'hubid' is missing
    Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    Message-id: 1431691143-1015-2-git-send-email-armbru@redhat.com
    Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
    ca7eb184
hub.c 8.2 KB