mirror of https://gitee.com/openkylin/qemu.git
nvme: Permit zero-length block devices
It may not be sensible for normal use cases, but it allows to use /dev/null in QTest. Acked-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
5c4e24c151
commit
592408b8ca
|
@ -752,8 +752,8 @@ static int nvme_init(PCIDevice *pci_dev)
|
|||
return -1;
|
||||
}
|
||||
|
||||
bs_size = bdrv_getlength(n->conf.bs);
|
||||
if (bs_size <= 0) {
|
||||
bs_size = bdrv_getlength(n->conf.bs);
|
||||
if (bs_size < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue