From: Oliver O'Halloran <oohall@gmail.com>
To: linux-nvdimm@lists.01.org
Subject: [PATCH] libndctl, dimm: Don't require an xlat function
Date: Wed, 30 Jan 2019 21:26:45 +1100 [thread overview]
Message-ID: <20190130102645.31032-1-oohall@gmail.com> (raw)
commit 62bbfce3cb62 ("libndctl, intel: Add infrastructure for
firmware_status translation") has the unfortunate side effect of making
all NDCTL commands fail with -ENOMSG unless an xlat_firmware_status
function is defined for the DIMM family. This means that none of the
DIMM label manipulation commands work anymore, unless you happen to be
using an Intel DIMM.
Cc: Vishal Verma <vishal.l.verma@intel.com>
Fixes: 62bbfce3cb62 ("libndctl, intel: Add infrastructure for firmware_status translation")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
ndctl/lib/libndctl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index 06f835d76117..80d107394a74 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -2846,6 +2846,9 @@ NDCTL_EXPORT int ndctl_cmd_submit_xlat(struct ndctl_cmd *cmd)
* useful), then the xlat function is available separately as well.
*/
xlat_rc = ndctl_cmd_xlat_firmware_status(cmd);
+ if (xlat_rc == -ENOMSG)
+ return rc;
+
return (xlat_rc == 0) ? rc : xlat_rc;
}
--
2.20.1
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next reply other threads:[~2019-01-30 10:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 10:26 Oliver O'Halloran [this message]
2019-01-30 16:38 ` [PATCH] libndctl, dimm: Don't require an xlat function Dan Williams
2019-01-30 19:05 ` Verma, Vishal L
2019-01-30 19:07 ` Dan Williams
[not found] ` <CAPcyv4jGYVNbbNZ5Kaw7SpwhH=BW8bgDGcj-80m2XmAKD5-ZEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-01-30 22:54 ` Dexuan Cui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190130102645.31032-1-oohall@gmail.com \
--to=oohall@gmail.com \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox