[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qdev: add return value to init() callbacks.

From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH] qdev: add return value to init() callbacks.
Date: Wed, 12 Aug 2009 20:28:40 +0100
User-agent: KMail/1.12.0 (Linux/2.6.30-1-amd64; KDE/4.3.0; x86_64; ; )

> We have already one case in-tree where this is needed:
> Try -device virtio-blk-pci (without drive= specified) and watch qemu
> segfault.

No. Failure of the init routine should be fatal. i.e. virtio_blk_init_pci 
should call hw_error.

If you want to allow graceful failure (which is pointless for commandline 
options, but may be desirable for hotplug devices) they you need to also add 
some way of reporting why device creation failure. fprintf(stderr) is just 
plain wrong.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]