|
| From: | Keith Busch |
| Subject: | Re: [Qemu-devel] [PATCH qom-next v3 12/15] nvme: Permit zero-length block devices |
| Date: | Wed, 12 Mar 2014 13:13:55 -0600 (MDT) |
| User-agent: | Alpine 2.03 (LRH 1266 2009-07-14) |
On Wed, 12 Mar 2014, Andreas Färber wrote:
It may not be sensible for normal use cases, but it allows to use /dev/null in QTest.
Thanks! Sounds useful despite not being usable as storage. :) I applied to my nvme tree here: http://git.infradead.org/users/kbusch/qemu-nvme.git It's quite a bit ahead of the upstream on 'nvme features'. I often hear from people in various orgs using this, so might be time I roll it into a pull request.
Signed-off-by: Andreas Färber <address@hidden>
---
hw/block/nvme.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 2882ffe..5fd8f89 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -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;
}
--
1.8.4.5
| [Prev in Thread] | Current Thread | [Next in Thread] |