提交 f550804a 编写于 作者: A Amit Shah 提交者: Rusty Russell

virtio: console: We support only one device at a time

We support only one virtio_console device at a time. If multiple are
found, error out if one is already initialized.
Signed-off-by: NAmit Shah <amit.shah@redhat.com>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 1dff3996
...@@ -204,6 +204,11 @@ static int __devinit virtcons_probe(struct virtio_device *dev) ...@@ -204,6 +204,11 @@ static int __devinit virtcons_probe(struct virtio_device *dev)
struct virtqueue *vqs[2]; struct virtqueue *vqs[2];
int err; int err;
if (vdev) {
dev_warn(&vdev->dev,
"Multiple virtio-console devices not supported yet\n");
return -EEXIST;
}
vdev = dev; vdev = dev;
/* This is the scratch page we use to receive console input */ /* This is the scratch page we use to receive console input */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册