mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
libnvdimm, nfit: centralize command status translation
The return value from an 'ndctl_fn' reports the command execution status, i.e. was the command properly formatted and was it successfully submitted to the bus provider. The new 'cmd_rc' parameter allows the bus provider to communicate command specific results, translated into common error codes. Convert the ARS commands to this scheme to: 1/ Consolidate status reporting 2/ Prepare for for expanding ars unit test cases 3/ Make the implementation more generic Cc: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
3b87356f50
commit
aef2533822
6 changed files with 140 additions and 69 deletions
|
@ -48,7 +48,7 @@ struct nvdimm;
|
|||
struct nvdimm_bus_descriptor;
|
||||
typedef int (*ndctl_fn)(struct nvdimm_bus_descriptor *nd_desc,
|
||||
struct nvdimm *nvdimm, unsigned int cmd, void *buf,
|
||||
unsigned int buf_len);
|
||||
unsigned int buf_len, int *cmd_rc);
|
||||
|
||||
struct nd_namespace_label;
|
||||
struct nvdimm_drvdata;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue