From: Gollu Appalanaidu
Date: Fri, 28 May 2021 18:11:33 +0000 (+0530)
Subject: nvme: add json, binary and human readable output format for id iocs
X-Git-Tag: v1.15~50
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7f9f9b95dbec6f988ff0724d6947fa39c6c0e058;p=users%2Fsagi%2Fnvme-cli.git
nvme: add json, binary and human readable output format for id iocs
Signed-off-by: Gollu Appalanaidu
---
diff --git a/Documentation/nvme-id-iocs.1 b/Documentation/nvme-id-iocs.1
index f79b4de2..2320de32 100644
--- a/Documentation/nvme-id-iocs.1
+++ b/Documentation/nvme-id-iocs.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: nvme-id-iocs
-.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
-.\" Generator: DocBook XSL Stylesheets vsnapshot
-.\" Date: 10/20/2020
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 05/28/2021
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-IOCS" "1" "10/20/2020" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-IOCS" "1" "05/28/2021" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -33,6 +33,7 @@ nvme-id-iocs \- Send NVMe Identify I/O Command Set, return result and structure
.sp
.nf
\fInvme id\-iocs\fR [\-\-controller\-id= | \-c ]
+ [\-o | \-\-output\-format=]
.fi
.SH "DESCRIPTION"
.sp
@@ -45,6 +46,19 @@ The parameter is mandatory and may be either the NVMe character device
.RS 4
Retrieve the identify I/O Command set data structure for the given cntid\&. If this value is not given, cntid will be 0xffff\&.
.RE
+.PP
+\-H, \-\-human\-readable
+.RS 4
+This option will parse and format many of the bit fields into human\-readable formats\&.
+.RE
+.PP
+\-o , \-\-output\-format=
+.RS 4
+Set the reporting format to
+\fInormal\fR,
+\fIjson\fR, or
+\fIbinary\fR\&. Only one output format can be used at a time\&.
+.RE
.SH "EXAMPLES"
.sp
.RS 4
@@ -67,6 +81,27 @@ Have the program interpret the returned buffer and display the known fields in a
.RE
.\}
.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+show the fields in human readable format
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+# nvme id\-iocs /dev/nvme0 \-H
+.fi
+.if n \{\
+.RE
+.\}
+.RE
.SH "NVME"
.sp
Part of the nvme\-user suite
diff --git a/Documentation/nvme-id-iocs.html b/Documentation/nvme-id-iocs.html
index 6bc983f7..159f3063 100644
--- a/Documentation/nvme-id-iocs.html
+++ b/Documentation/nvme-id-iocs.html
@@ -749,7 +749,8 @@ nvme-id-iocs(1) Manual Page
SYNOPSIS
-
nvme id-iocs <device> [--controller-id=<cntid> | -c <cntid>]
+
nvme id-iocs <device> [--controller-id=<cntid> | -c <cntid>]
+ [-o <fmt> | --output-format=<fmt>]
@@ -779,6 +780,30 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).
+
+-H
+
+
+--human-readable
+
+
+
+ This option will parse and format many of the bit fields
+ into human-readable formats.
+
+
+
+-o <format>
+
+
+--output-format=<format>
+
+
+
+ Set the reporting format to normal, json, or
+ binary. Only one output format can be used at a time.
+
+
@@ -796,6 +821,15 @@ fields in a human readable format:
# nvme id-iocs /dev/nvme0
+
+
+show the fields in human readable format
+
+
+
+
# nvme id-iocs /dev/nvme0 -H
+
+
@@ -810,7 +844,7 @@ fields in a human readable format: