On Fri, Oct 12, 2018 at 3:28 PM Dave Jiang <[email protected]> wrote:
>
> Adding libndctl API call for retrieving security state for a DIMM and also
> adding support to ndctl list for displaying security state.
>
> Signed-off-by: Dave Jiang <[email protected]>
> ---
> Documentation/ndctl/ndctl-list.txt | 8 ++++++++
> ndctl/lib/dimm.c | 16 ++++++++++++++++
> ndctl/lib/libndctl.sym | 5 +++++
> ndctl/libndctl.h | 1 +
> util/json.c | 8 ++++++++
> 5 files changed, 38 insertions(+)
>
> diff --git a/Documentation/ndctl/ndctl-list.txt
> b/Documentation/ndctl/ndctl-list.txt
> index e24c8f40..a4a712a0 100644
> --- a/Documentation/ndctl/ndctl-list.txt
> +++ b/Documentation/ndctl/ndctl-list.txt
> @@ -98,6 +98,14 @@ include::xable-region-options.txt[]
> -D::
> --dimms::
> Include dimm info in the listing
> +[verse]
> +{
> + "dev":"nmem0",
> + "id":"cdab-0a-07e0-ffffffff",
> + "handle":0,
> + "phys_id":0,
> + "security_state:":"disabled"
Lets drop the _state suffix.
> +}
>
> -H::
> --health::
> diff --git a/ndctl/lib/dimm.c b/ndctl/lib/dimm.c
> index 5e41734d..4470d5fe 100644
> --- a/ndctl/lib/dimm.c
> +++ b/ndctl/lib/dimm.c
> @@ -583,3 +583,19 @@ NDCTL_EXPORT unsigned long
> ndctl_dimm_get_available_labels(
>
> return strtoul(buf, NULL, 0);
> }
> +
> +NDCTL_EXPORT int ndctl_dimm_get_security_state(struct ndctl_dimm *dimm,
> + char *state)
> +{
Same here, lets drop the _state suffix, and combined with the last
comment about returning an enum makes it clearer what this function is
returning.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm