From: Keith Busch Date: Sat, 14 May 2016 17:07:53 +0000 (-0400) Subject: Pre-fill user buffers on passthrough commands X-Git-Tag: v0.7~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c5418f070be300c4fe75d8fe038d36aa28d83ccd;p=users%2Fhch%2Fnvme-cli.git Pre-fill user buffers on passthrough commands Reported that user data may be shorter than the buffer length, and need to pad the data with a fixed byte value. Also requested that we provied a way to prefill data in buffers so we can know if a device is corrupting memory. Signed-off-by: Keith Busch --- diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1 index 7be84bc..94c8b62 100644 --- a/Documentation/nvme-admin-passthru.1 +++ b/Documentation/nvme-admin-passthru.1 @@ -1,13 +1,13 @@ '\" t .\" Title: nvme-admin-passthru .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/26/2016 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 05/14/2016 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ADMIN\-PASSTHR" "1" "02/26/2016" "NVMe" "NVMe Manual" +.TH "NVME\-ADMIN\-PASSTHR" "1" "05/14/2016" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,6 +44,7 @@ nvme-admin-passthru \- Submit an arbitrary admin command, return results [\-\-timeout= | \-t ] [\-\-show\-command | \-\-dry\-run | \-s] [\-\-raw\-binary | \-b] + [\-\-prefill= | \-p ] .fi .SH "DESCRIPTION" .sp @@ -108,6 +109,11 @@ Do not actually send the command; print out the command that would be sent\&. .RS 4 Print the raw returned buffer to stdout if the command returns a structure\&. .RE +.PP +\-p, \-\-prefill +.RS 4 +Prefill the buffer with a predetermined byte value\&. Defaults to 0\&. This may be useful if the data you are writing is shorter than the required buffer, and you need to pad it with a known value\&. It may also be useful if you need to confirm if a device is overwriting a buffer for a data\-in command\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-admin-passthru.html b/Documentation/nvme-admin-passthru.html index a955088..b42fd4f 100644 --- a/Documentation/nvme-admin-passthru.html +++ b/Documentation/nvme-admin-passthru.html @@ -3,7 +3,7 @@ - + nvme-admin-passthru(1)