From: Tokunori Ikegami <ikegami.t@gmail.com>
Date: Fri, 27 Jan 2023 21:20:19 +0000 (+0900)
Subject: doc: Update device-self-test command documentation
X-Git-Tag: v2.3~3^2~1
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d80bb9516eace678e6056a8bffe0cec05f018924;p=users%2Fsagi%2Fnvme-cli.git

doc: Update device-self-test command documentation

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
---

diff --git a/Documentation/nvme-device-self-test.txt b/Documentation/nvme-device-self-test.txt
index 48763f5e..d0982777 100644
--- a/Documentation/nvme-device-self-test.txt
+++ b/Documentation/nvme-device-self-test.txt
@@ -28,16 +28,19 @@ OPTIONS
 
 -s <NUM>::
 --self-test-code=<NUM>::
-        This field specifies the action taken by the device self-test command : 
+        This field specifies the action taken by the device self-test command :
+         0h: Show current state of device self-test operation
          1h: Start a short device self-test operation
          2h: Start a extended device self-test operation
          eh: Start a vendor specific device self-test operation
-         fh: abort the device self-test operation
+         fh: Abort the device self-test operation
+	Default is 0h.
 
 -w::
 --wait::
 	Wait for the device self test to complete before exiting
-
+	The device self-test is aborted by SIGINT signal interrupt for the wait
+	The option is ignored if the abort self-test code option specified.
 
 EXAMPLES
 --------
diff --git a/nvme.c b/nvme.c
index e4f376e5..6a51dfe6 100644
--- a/nvme.c
+++ b/nvme.c
@@ -4265,13 +4265,13 @@ static int device_self_test(int argc, char **argv, struct command *cmd, struct p
 		" which provides the necessary log to determine the state of the device";
 	const char *namespace_id = "Indicate the namespace in which the device self-test"\
 		" has to be carried out";
-	const char * self_test_code = "This field specifies the action taken by the device self-test command : "\
-		"\n0h Show current state of device self-test operation\n"\
-		"\n1h Start a short device self-test operation\n"\
+	const char * self_test_code = "This field specifies the action taken by the device self-test command :\n"\
+		"0h Show current state of device self-test operation\n"\
+		"1h Start a short device self-test operation\n"\
 		"2h Start a extended device self-test operation\n"\
 		"eh Start a vendor specific device self-test operation\n"\
-		"fh abort the device self-test operation";
-	const char *wait = "wait for the test to finish";
+		"fh Abort the device self-test operation";
+	const char *wait = "Wait for the test to finish";
 	struct nvme_dev *dev;
 	int err;