OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c4e24c
)
nvme: Permit zero-length block devices
author
Andreas Färber
<afaerber@suse.de>
Fri, 21 Feb 2014 21:18:31 +0000
(22:18 +0100)
committer
Andreas Färber
<afaerber@suse.de>
Mon, 31 Mar 2014 20:35:03 +0000
(22:35 +0200)
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>
hw/block/nvme.c
patch
|
blob
|
history
diff --git
a/hw/block/nvme.c
b/hw/block/nvme.c
index
2882ffe
..
5fd8f89
100644
(file)
--- 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;
}