It is important for the flag names to be explicit about their polarity
as feedback to a firmware implementer to get the polarity correct.
Update to keep in sync with the kernel rename.
Cc: Robert Elliott <elliott(a)hp.com>
Cc: Toshi Kani <toshi.kani(a)hp.com>
Cc: Linda Knippers <linda.knippers(a)hp.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
lib/libndctl.c | 10 +++++-----
lib/test-libndctl.c | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/libndctl.c b/lib/libndctl.c
index d08cf0812f50..d85453a3ac63 100644
--- a/lib/libndctl.c
+++ b/lib/libndctl.c
@@ -839,15 +839,15 @@ static void parse_nfit_mem_flags(struct ndctl_dimm *dimm, char
*flags)
start = flags;
while ((end = strchr(start, ' '))) {
*end = '\0';
- if (strcmp(start, "arm") == 0)
+ if (strcmp(start, "not_armed") == 0)
dimm->f_arm = 1;
- else if (strcmp(start, "save") == 0)
+ else if (strcmp(start, "save_fail") == 0)
dimm->f_save = 1;
- else if (strcmp(start, "flush") == 0)
+ else if (strcmp(start, "flush_fail") == 0)
dimm->f_flush = 1;
- else if (strcmp(start, "smart") == 0)
+ else if (strcmp(start, "smart_event") == 0)
dimm->f_smart = 1;
- else if (strcmp(start, "restore") == 0)
+ else if (strcmp(start, "restore_fail") == 0)
dimm->f_restore = 1;
start = end + 1;
}
diff --git a/lib/test-libndctl.c b/lib/test-libndctl.c
index c2e7bc7b4ff4..ec03ad439d55 100644
--- a/lib/test-libndctl.c
+++ b/lib/test-libndctl.c
@@ -1471,8 +1471,8 @@ static int check_dimms(struct ndctl_bus *bus, struct dimm *dimms,
int n,
if (ndctl_dimm_has_errors(dimm) != !!dimms[i].flags) {
fprintf(stderr, "bus: %s dimm%d %s expected%s errors\n",
ndctl_bus_get_provider(bus), i,
- dimms[i].flags ? "" : " no",
- ndctl_dimm_get_devname(dimm));
+ ndctl_dimm_get_devname(dimm),
+ dimms[i].flags ? "" : " no");
return -ENXIO;
}