virtio-serial: Check if more max_ports specified than we can handle
commit5ab4bb598d3f58542a06a6946f04b140be222892
authorAmit Shah <amit.shah@redhat.com>
Wed, 21 Jul 2010 09:38:30 +0000 (21 15:08 +0530)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 30 Jul 2010 20:59:55 +0000 (30 22:59 +0200)
treeecff8852cbe9f404fee070ec064a2c03b1a33f6e
parentcdc6f542007a6aee0b18a5d616d031c750691e7a
virtio-serial: Check if more max_ports specified than we can handle

Currently virtio-serial supports a maximum of 31 ports. Specifying the
'max_ports' parameter to be > 31 on the cmd line causes badness.

Ensure we initialise virtio-serial only if max_ports is within the
supported range.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/virtio-serial-bus.c