Linux-NVDIMM Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: linux-nvdimm@lists.01.org
Subject: Re: [ndctl PATCH 4/5] ndctl, list: add a '--health' option
Date: Thu, 07 Apr 2016 10:41:04 +0200	[thread overview]
Message-ID: <1502009.VVHIfC1a8J@c203> (raw)
In-Reply-To: <20160407010720.30641.60021.stgit@dwillia2-desk3.jf.intel.com>

On Mittwoch, 6. April 2016 18:07:20 CEST Dan Williams wrote:
> Dump dimm smart data in the dimm listing when '--health' is specified.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---

[...]

> @@ -200,6 +201,7 @@ int cmd_list(int argc, const char **argv)
>  				"filter by region-type"),
>  		OPT_BOOLEAN('B', "buses", &list.buses, "include bus info"),
>  		OPT_BOOLEAN('D', "dimms", &list.dimms, "include dimm info"),
> +		OPT_BOOLEAN('H', "health", &list.health, "include dimm health"),
>  		OPT_BOOLEAN('R', "regions", &list.regions,
>  				"include region info"),
>  		OPT_BOOLEAN('N', "namespaces", &list.namespaces,
> @@ -299,6 +301,15 @@ int cmd_list(int argc, const char **argv)
>  				continue;
>  			}
> 
> +			if (list.health) {
> +				struct json_object *jhealth;
> +
> +				jhealth = util_dimm_health_to_json(dimm);
> +				if (jhealth)
> +					json_object_object_add(jdimm, "health",
> +							jhealth);

Maybe some sort of error message for the else path? Either here or in 
util_dimm_health_to_json()?

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2016-04-07  8:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  1:06 [ndctl PATCH 0/5] smart support and 'list' enhancements Dan Williams
2016-04-07  1:07 ` [ndctl PATCH 1/5] ndctl: rebuild libndctl.h when libndctl.h.in changes Dan Williams
2016-04-07  8:29   ` Johannes Thumshirn
2016-04-07  1:07 ` [ndctl PATCH 2/5] ndctl: helper for S.M.A.R.T. data retrieval Dan Williams
2016-04-07  8:36   ` Johannes Thumshirn
2016-04-07 22:39   ` [ndctl PATCH v2] " Dan Williams
2016-04-08  7:23     ` Johannes Thumshirn
2016-04-07  1:07 ` [ndctl PATCH 3/5] ndctl, list: clean up default behavior Dan Williams
2016-04-07  8:38   ` Johannes Thumshirn
2016-04-07  1:07 ` [ndctl PATCH 4/5] ndctl, list: add a '--health' option Dan Williams
2016-04-07  8:41   ` Johannes Thumshirn [this message]
2016-04-07 13:16     ` Dan Williams
2016-04-07 22:42   ` [ndctl PATCH v2] " Dan Williams
2016-04-08  7:20     ` Johannes Thumshirn
2016-04-07  1:07 ` [ndctl PATCH 5/5] ndctl, list: add 'filter by dimm' capability Dan Williams
2016-04-07  8:42   ` Johannes Thumshirn

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=1502009.VVHIfC1a8J@c203 \
    --to=jthumshirn@suse.de \
    --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