linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH V3 1/2] nvme-cli: add minimal ana-log page support
Date: Fri, 03 Aug 2018 20:59:24 +0900	[thread overview]
Message-ID: <1533297564.2982.11.camel@gmail.com> (raw)
In-Reply-To: <20180802032819.6558-2-chaitanya.kulkarni@wdc.com>

Hi Chaitanya,

One more trivial comment on this patch.

On 18-08-01 20:28:18, Chaitanya Kulkarni wrote:
> This patch adds a new command to retrieve the ANA Log page.
> We update identify ctrl/ns data structure to support this command.
> We also add ana based error codes and different identifiers to the
> linux/nvme.h header file in order to support this command.
>?
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> Signed-off-by: Hannes Reinecke <hare at suse.com>
> ---

> +static int get_ana_log(int argc, char **argv, struct command *cmd,
> +		struct plugin *plugin)
> +{
> +	const char *desc = "Retrieve ANA log for the given device" \
> +			"in either decoded format "\
> +			"(default) or binary.";
> +	const char *raw = "output in binary format";
> +	void *ana_log;
> +	int err, fmt, fd;
> +	int groups = 0; /* Right now get all the per ANA group NSIDS */
> +	size_t ana_log_len;
> +	struct nvme_id_ctrl ctrl;
> +
> +	struct config {
> +		int???raw_binary;
> +		char *output_format;
> +	};
> +
> +	struct config cfg = {
> +		.output_format = "normal",
> +	};
> +
> +	const struct argconfig_commandline_options command_line_options[] = {
> +		{"output-format", 'o', "FMT", CFG_STRING,???&cfg.output_format, required_argument, output_format },
> +		{"raw-binary",????'b', "",????CFG_NONE,?????&cfg.raw_binary,????no_argument,???????raw},
> +		{NULL}
> +	};
> +

There was a discussion about the '--raw-binary' option to deprecate it because
'--output-format=binary' or '-o binary' will make a same result.

You can find the discussion on the Github PR #342 in following link:
????https://github.com/linux-nvme/nvme-cli/pull/342

For the newly added subcommand, it doesn't need to support the '--raw-binary'
option anymore.

Thanks,

	Minwoo Im

  parent reply	other threads:[~2018-08-03 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02  3:28 [PATCH V3 0/2] nvme-cli: add ana-log page support Chaitanya Kulkarni
2018-08-02  3:28 ` [PATCH V3 1/2] nvme-cli: add minimal " Chaitanya Kulkarni
2018-08-03 10:18   ` Minwoo Im
2018-08-03 11:59   ` Minwoo Im [this message]
2018-08-02  3:28 ` [PATCH V3 2/2] nvme-cli: add ana-log documentation Chaitanya Kulkarni
2018-08-03 11:59   ` Minwoo Im

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=1533297564.2982.11.camel@gmail.com \
    --to=minwoo.im.dev@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).