[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 11/13] nvdimm: allow setting the label-size to 0
From: |
David Hildenbrand |
Subject: |
[Qemu-ppc] [PATCH v3 11/13] nvdimm: allow setting the label-size to 0 |
Date: |
Fri, 15 Jun 2018 16:04:46 +0200 |
It is inititally 0, so setting it to 0 should be allowed, too.
Signed-off-by: David Hildenbrand <address@hidden>
---
hw/mem/nvdimm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
index db7d8c3050..df7646488b 100644
--- a/hw/mem/nvdimm.c
+++ b/hw/mem/nvdimm.c
@@ -52,9 +52,9 @@ static void nvdimm_set_label_size(Object *obj, Visitor *v,
const char *name,
if (local_err) {
goto out;
}
- if (value < MIN_NAMESPACE_LABEL_SIZE) {
+ if (value && value < MIN_NAMESPACE_LABEL_SIZE) {
error_setg(&local_err, "Property '%s.%s' (0x%" PRIx64 ") is required"
- " at least 0x%lx", object_get_typename(obj),
+ " either 0 or at least 0x%lx", object_get_typename(obj),
name, value, MIN_NAMESPACE_LABEL_SIZE);
goto out;
}
--
2.17.1
- [Qemu-ppc] [PATCH v3 05/13] pc: factor out pc specific dimm checks into pc_memory_pre_plug(), (continued)
- [Qemu-ppc] [PATCH v3 05/13] pc: factor out pc specific dimm checks into pc_memory_pre_plug(), David Hildenbrand, 2018/06/15
- [Qemu-ppc] [PATCH v3 06/13] nvdimm: no need to overwrite get_vmstate_memory_region(), David Hildenbrand, 2018/06/15
- [Qemu-ppc] [PATCH v3 08/13] pc-dimm: merge get_(vmstate_)memory_region(), David Hildenbrand, 2018/06/15
- [Qemu-ppc] [PATCH v3 07/13] hostmem: drop error variable from host_memory_backend_get_memory(), David Hildenbrand, 2018/06/15
- [Qemu-ppc] [PATCH v3 10/13] nvdimm: convert nvdimm_mr into a pointer, David Hildenbrand, 2018/06/15
- [Qemu-ppc] [PATCH v3 11/13] nvdimm: allow setting the label-size to 0,
David Hildenbrand <=
- [Qemu-ppc] [PATCH v3 12/13] nvdimm: make get_memory_region() perform checks and initialization, David Hildenbrand, 2018/06/15
- [Qemu-ppc] [PATCH v3 09/13] nvdimm: convert "unarmed" into a static property, David Hildenbrand, 2018/06/15
- [Qemu-ppc] [PATCH v3 13/13] pc-dimm: get_memory_region() will not fail after realize, David Hildenbrand, 2018/06/15