spapr_nvdimm: Tweak error messages
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 24 Apr 2020 01:56:17 +0000 (11:56 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 May 2020 01:10:50 +0000 (11:10 +1000)
The restrictions here (which are checked at pre-plug time) are PAPR
specific, rather than being inherent to the NVDIMM devices.  Adjust the
error messages to be clearer about this.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_nvdimm.c

index 9abcdcc26bf545b363929d59e739a2019c47cb54..81410aa63fe924fba0d8fd5214fc683489add842 100644 (file)
@@ -39,13 +39,13 @@ void spapr_nvdimm_validate_opts(NVDIMMDevice *nvdimm, uint64_t size,
 
     if (object_property_get_int(OBJECT(nvdimm), NVDIMM_LABEL_SIZE_PROP,
                                 &error_abort) == 0) {
-        error_setg(errp, "NVDIMM device requires label-size to be set");
+        error_setg(errp, "PAPR requires NVDIMM devices to have label-size set");
         return;
     }
 
     if (size % SPAPR_MINIMUM_SCM_BLOCK_SIZE) {
-        error_setg(errp, "NVDIMM memory size excluding the label area"
-                   " must be a multiple of %" PRIu64 "MB",
+        error_setg(errp, "PAPR requires NVDIMM memory size (excluding label)"
+                   " to be a multiple of %" PRIu64 "MB",
                    SPAPR_MINIMUM_SCM_BLOCK_SIZE / MiB);
         return;
     }