Message ID | 20170606072229.9302-2-haozhong.zhang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Jun 06, 2017 at 03:22:26PM +0800, Haozhong Zhang wrote: > Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> > --- > hw/mem/nvdimm.c | 2 +- > include/hw/mem/nvdimm.h | 3 +++ > 2 files changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c index db896b0bb6..a9b0863f20 100644 --- a/hw/mem/nvdimm.c +++ b/hw/mem/nvdimm.c @@ -66,7 +66,7 @@ out: static void nvdimm_init(Object *obj) { - object_property_add(obj, "label-size", "int", + object_property_add(obj, NVDIMM_LABEL_SIZE_PROP, "int", nvdimm_get_label_size, nvdimm_set_label_size, NULL, NULL, NULL); } diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h index 03e1ff9558..f1f3987055 100644 --- a/include/hw/mem/nvdimm.h +++ b/include/hw/mem/nvdimm.h @@ -47,6 +47,9 @@ #define NVDIMM_CLASS(oc) OBJECT_CLASS_CHECK(NVDIMMClass, (oc), TYPE_NVDIMM) #define NVDIMM_GET_CLASS(obj) OBJECT_GET_CLASS(NVDIMMClass, (obj), \ TYPE_NVDIMM) + +#define NVDIMM_LABEL_SIZE_PROP "label-size" + struct NVDIMMDevice { /* private */ PCDIMMDevice parent_obj;
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> --- hw/mem/nvdimm.c | 2 +- include/hw/mem/nvdimm.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)