From: root Date: Mon, 27 Jun 2016 16:28:33 +0000 (-0700) Subject: Changed save variable from bool to int X-Git-Tag: v0.8~1^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d7deb06b7fd80c3153d952f1dbb751b2027f145a;p=users%2Fhch%2Fnvme-cli.git Changed save variable from bool to int Added "--save/-s" option to man page and documentation Modified set-feature documentation (Removed invalid command line options, removed references to get-feature, and corrected examples to use set-feature instead of get-feature --- diff --git a/Documentation/nvme-set-feature.1 b/Documentation/nvme-set-feature.1 index 3cf3bdf..cbe6bab 100644 --- a/Documentation/nvme-set-feature.1 +++ b/Documentation/nvme-set-feature.1 @@ -2,12 +2,12 @@ .\" Title: nvme-set-feature .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 05/16/2016 +.\" Date: 06/27/2016 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SET\-FEATURE" "1" "05/16/2016" "NVMe" "NVMe Manual" +.TH "NVME\-SET\-FEATURE" "1" "06/27/2016" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,23 +33,23 @@ nvme-set-feature \- Sets an NVMe feature, returns applicable results .sp .nf \fInvme set\-feature\fR [\-\-namespace\-id= | \-n ] - [\-\-feature\-id= | \-f ] [\-\-value=] + [\-\-feature\-id= | \-f ] [\-\-value= | \-v ] [\-\-data\-len= | \-l ] [\-\-data= | \-d ] - [\-\-raw\-binary | \-b] + [\-\-save| \-s] .fi .SH "DESCRIPTION" .sp -Submits an NVMe Get Feature admin command and returns the applicable results\&. This may be the feature\(cqs value, or may also include a feature structure if the feature requires it (ex: LBA Range Type)\&. +Submits an NVMe Set Feature admin command and returns the applicable results\&. This may be the feature\(cqs value, or may also include a feature structure if the feature requires it (ex: LBA Range Type)\&. .sp The parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1)\&. .sp -On success, the returned feature\(cqs structure (if applicable) may be returned in one of several ways depending on the option flags; the structure may parsed by the program and printed in a readable format if it is a known structure, displayed in hex, or the raw buffer may be printed to stdout for another program to parse\&. +On success, the value sent to the device is displayed .SH "OPTIONS" .PP \-n , \-\-namespace\-id= .RS 4 -Retrieve the feature for the given nsid\&. This is optional and most features do not use this value\&. +Sets the feature for the given nsid\&. This is optional and most features do not use this value\&. .RE .PP \-f , \-\-feature\-id= @@ -67,53 +67,16 @@ The data length for the buffer submitted for this feature\&. Most known features The data file for the buffer submitted for this feature\&. Most known features do not use this value\&. The exceptions is LBA Range Type and host identifier\&. This defaults to STDIN so files and echo can be piped\&. .RE .PP -\-\-value= +\-v , \-\-value= .RS 4 The value for command dword 11, the value you want to set the feature to\&. .RE -.SH "EXAMPLES" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Retrieves the feature for Number of Queues, or feature id 7: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# nvme set\-feature /dev/nvme0 \-f 7 -.fi -.if n \{\ -.RE -.\} -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The following retrieves the feature for the LBA Range Type, which implicitly requires a buffer and will be printed to the screen in human readable format: -.sp -.if n \{\ +.PP +\-s, \-\-save .RS 4 -.\} -.nf -# nvme set\-feature /dev/nvme0 \-f 3 -.fi -.if n \{\ -.RE -.\} +Save the attribute so that it persists through all power states and resets\&. .RE +.SH "EXAMPLES" .sp .RS 4 .ie n \{\ @@ -123,13 +86,13 @@ The following retrieves the feature for the LBA Range Type, which implicitly req .sp -1 .IP \(bu 2.3 .\} -Retrieves the feature for the some vendor specific feature and specifically requesting a buffer be allocate for this feature, which will be displayed to the user in as a hex dump: +Sets the Power State (PS) to 1 in feature id 2: .sp .if n \{\ .RS 4 .\} .nf -# nvme set\-feature /dev/nvme0 \-f 0xc0 \-l 512 +# nvme set\-feature /dev/nvme0 \-f 2 /dev/nvme0n1 \-v 0x1 .fi .if n \{\ .RE @@ -156,29 +119,6 @@ Sets the host id to the ascii string\&. .RE .\} .RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The following retrieves the feature for the LBA Range Type, which implicitly requires a buffer and will be saved to a file in its raw format: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# nvme set\-feature /dev/nvme0 \-f 3 \-\-raw\-binary > lba_range\&.raw -.fi -.if n \{\ -.RE -.\} -.sp -It is probably a bad idea to not redirect stdout when using this mode\&. -.RE .SH "NVME" .sp Part of the nvme\-user suite diff --git a/Documentation/nvme-set-feature.html b/Documentation/nvme-set-feature.html index 2f507fa..3185715 100644 --- a/Documentation/nvme-set-feature.html +++ b/Documentation/nvme-set-feature.html @@ -3,7 +3,7 @@ - + nvme-set-feature(1)