mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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:
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user