提交 592408b8 编写于 作者: A Andreas Färber

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: NKeith Busch <keith.busch@intel.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 5c4e24c1
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册