[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 6/9] s390x/virtio: use qemu_check_nic_model()
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 6/9] s390x/virtio: use qemu_check_nic_model() |
Date: |
Wed, 13 Jan 2016 16:01:41 +0100 |
Switching to the generally used interface changes the output of
s390x-softmmu/qemu-system-s390x -net nic,model=?
from
S390 only supports VirtIO nics
to the rather more useful
qemu: Supported NIC models: virtio
while still giving us a sensible error message for unsupported
models:
s390x-softmmu/qemu-system-s390x -net nic,model=foo
qemu-system-s390x: Unsupported NIC model: foo
Acked-by: David Hildenbrand <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/s390-virtio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index 5dbb815..946325f 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -131,10 +131,7 @@ void s390_create_virtio_net(BusState *bus, const char
*name)
nd->model = g_strdup("virtio");
}
- if (strcmp(nd->model, "virtio")) {
- fprintf(stderr, "S390 only supports VirtIO nics\n");
- exit(1);
- }
+ qemu_check_nic_model(nd, "virtio");
dev = qdev_create(bus, name);
qdev_set_nic_properties(dev, nd);
--
2.7.0
- [Qemu-devel] [PULL 0/9] First set of s390x patches for 2.6, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 8/9] virtio-ccw: fix sanity check for vector, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 2/9] s390x: remove s390-virtio machine, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 5/9] s390x/pci: code cleanup, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 1/9] s390x: add 2.6 compat machine, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 6/9] s390x/virtio: use qemu_check_nic_model(),
Cornelia Huck <=
- [Qemu-devel] [PULL 7/9] s390: Introduce CCW_COMPAT_2_5, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 4/9] s390x/pci: reject some operations to disabled PCI function, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 9/9] s390x/pci: return real state during listing PCI, Cornelia Huck, 2016/01/13
- [Qemu-devel] [PULL 3/9] s390x: remove s390-virtio devices, Cornelia Huck, 2016/01/13
- Re: [Qemu-devel] [PULL 0/9] First set of s390x patches for 2.6, Peter Maydell, 2016/01/14