Skip to content

Commit d35bccd

Browse files
ikegami-tigaw
authored andcommitted
completions: Add timeout option bash completions
Added the option as a nvme default option. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
1 parent aa0b77a commit d35bccd

File tree

1 file changed

+37
-32
lines changed

1 file changed

+37
-32
lines changed

completions/bash-nvme-completion.sh

+37-32
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ nvme_list_opts () {
6363
;;
6464
"list-ns")
6565
opts+=" --namespace-id= -n --al -a --csi= -y \
66-
--outputformat= -o"
66+
--outputformat= -o --timeout= -t"
6767
;;
6868
"list-ctrl")
6969
opts+=" --namespace-id= -n --cntid= -c \
@@ -163,7 +163,7 @@ nvme_list_opts () {
163163
;;
164164
"effects-log")
165165
opts+=" --output-format= -o --human-readable -H \
166-
--raw-binary -b"
166+
--raw-binary -b --timeout= -t"
167167
;;
168168
"endurance-log")
169169
opts+=" --output-format= -o --group-id -g"
@@ -205,10 +205,10 @@ nvme_list_opts () {
205205
"get-feature")
206206
opts+=" --namespace-id= -n --feature-id= -f --sel= -s \
207207
--data-len= -l --cdw11= --c -uuid-index= -U --raw-binary -b \
208-
--human-readable -H"
208+
--human-readable -H --timeout= -t"
209209
;;
210210
"device-self-test")
211-
opts+=" --namespace-id= -n --self-test-code= -s"
211+
opts+=" --namespace-id= -n --self-test-code= -s --timeout= -t"
212212
;;
213213
"self-test-log")
214214
opts+=" --dst-entries= -e --output-format= -o \
@@ -217,30 +217,31 @@ nvme_list_opts () {
217217
"set-feature")
218218
opts+=" --namespace-id= -n --feature-id= -f --value= -v \
219219
--data-len= -l -data= -d --value= -v --save -s --uuid-index= -U \
220-
--cdw12= -c"
220+
--cdw12= -c --timeout= -t"
221221
;;
222222
"set-property")
223-
opts+=" --offset= -O --value= -V"
223+
opts+=" --offset= -O --value= -V --timeout= -t"
224224
;;
225225
"get-property")
226-
opts=+" --offset= -O --human-readable -H"
226+
opts=+" --offset= -O --human-readable -H --timeout= -t"
227227
;;
228228
"format")
229229
opts+=" --namespace-id= -n --timeout= -t --lbaf= -l \
230230
--ses= -s --pil= -p -pi= -i --ms= -m --reset -r"
231231
;;
232232
"fw-commit")
233-
opts+=" --slot= -s --action= -a --bpid= -b"
233+
opts+=" --slot= -s --action= -a --bpid= -b --timeout= -t"
234234
;;
235235
"fw-download")
236-
opts+=" --fw= -f --xfer= -x --offset= -O"
236+
opts+=" --fw= -f --xfer= -x --offset= -O --timeout= -t"
237237
;;
238238
"capacity-mgmt")
239239
opts+=" --operation= -O --element-id= -i --cap-lower= -l \
240-
--cap-upper= -u"
240+
--cap-upper= -u --timeout= -t"
241241
;;
242242
"lockdown")
243-
opts+=" --ofi= -O --ifc= -f --prhbt= -p --scp= -s --uuid -U"
243+
opts+=" --ofi= -O --ifc= -f --prhbt= -p --scp= -s --uuid -U \
244+
--timeout= -t"
244245
;;
245246
"admin-passthru")
246247
opts+=" --opcode= -O --flags= -f --prefil= -p --rsvd= -R \
@@ -262,11 +263,11 @@ nvme_list_opts () {
262263
;;
263264
"security-send")
264265
opts+=" --namespace-id= -n --file= -f --nssf= -N --secp= -p \
265-
--spsp= -s --tl= -t"
266+
--spsp= -s --tl= -t --timeout="
266267
;;
267268
"security-recv")
268269
opts+=" --namespace-id= -n --size= -x --secp= -p --spsp= -s \
269-
--al= -t --raw-binary -b"
270+
--al= -t --raw-binary -b --timeout="
270271
;;
271272
"get-lba-status")
272273
opts+=" --namespace-id= -n --start-lba= -s --max-dw= -m \
@@ -275,23 +276,24 @@ nvme_list_opts () {
275276
;;
276277
"resv-acquire")
277278
opts+=" --namespace-id= -n --crkey= -c --prkey= -p \
278-
--rtype= -t --racqa= -a --iekey= -i"
279+
--rtype= -t --racqa= -a --iekey= -i --timeout="
279280
;;
280281
"resv-register")
281282
opts+=" --namespace-id= -n --crkey= -c --nrkey= -k \
282-
--rrega= -r --cptpl= -p --iekey -i"
283+
--rrega= -r --cptpl= -p --iekey -i --timeout= -t"
283284
;;
284285
"resv-release")
285286
opts+=" --namespace-id= -n --crkey -c --rtype= -t \
286-
--rrela= -a --iekey -i"
287+
--rrela= -a --iekey -i --timeout="
287288
;;
288289
"resv-report")
289290
opts+=" --namespace-id= -n --numd= -d --eds -e \
290-
--raw-binary= -b --output-format= -o"
291+
--raw-binary= -b --output-format= -o --timeout= -t"
291292
;;
292293
"dsm")
293-
opts+=" --namespace-id= -n --ctx-attrs= -a --blocks= -b\
294-
--slbs= -s --ad -d --idw -w --idr -r --cdw11= -c"
294+
opts+=" --namespace-id= -n --ctx-attrs= -a --blocks= -b \
295+
--slbs= -s --ad -d --idw -w --idr -r --cdw11= -c \
296+
--timeout= -t"
295297
;;
296298
"copy")
297299
opts+=" --namespace-id= -n --sdlba= -d --blocks= -b --slbs= -s \
@@ -300,7 +302,7 @@ nvme_list_opts () {
300302
--ref-tag= -r --expected-ref-tag= -R \
301303
--app-tag= -a --expected-app-tag= -A \
302304
--app-tag-mask= -m --expected-app-tag-mask= -M \
303-
--dir-type= -T --dir-spec= -S --format= -F"
305+
--dir-type= -T --dir-spec= -S --format= -F --timeout= -t"
304306
;;
305307
"flush")
306308
opts+=" --namespace-id= -n"
@@ -312,7 +314,7 @@ nvme_list_opts () {
312314
--app-tag= -a --limited-retry -l \
313315
--force-unit-access -f --storage-tag-check -C \
314316
--dir-type= -T --dir-spec= -S --dsm= -D --show-command -V \
315-
--dry-run -w --latency -t"
317+
--dry-run -w --latency -t --timeout="
316318
;;
317319
"read")
318320
opts+=" --start-block= -s --block-count= -c --data-size= -z \
@@ -321,7 +323,7 @@ nvme_list_opts () {
321323
--app-tag= -a --limited-retry -l \
322324
--force-unit-access -f --storage-tag-check -C \
323325
--dir-type= -T --dir-spec= -S --dsm= -D --show-command -V \
324-
--dry-run -w --latency -t"
326+
--dry-run -w --latency -t --timeout="
325327
;;
326328
"write")
327329
opts+=" --start-block= -s --block-count= -c --data-size= -z \
@@ -330,26 +332,27 @@ nvme_list_opts () {
330332
--app-tag= -a --limited-retry -l \
331333
--force-unit-access -f --storage-tag-check -C \
332334
--dir-type= -T --dir-spec= -S --dsm= -D --show-command -V \
333-
--dry-run -w --latency -t"
335+
--dry-run -w --latency -t --timeout="
334336
;;
335337
"write-zeroes")
336338
opts+=" --namespace-id= -n --start-block= -s \
337339
--block-count= -c --deac -d --limited-retry -l \
338340
--force-unit-access -f --prinfo= -p --ref-tag= -r \
339341
--app-tag-mask= -m --app-tag= -a \
340342
--storage-tag= -S --storage-tag-check -C \
341-
--dir-type= -T --dir-spec= -S"
343+
--dir-type= -T --dir-spec= -S --timeout= -t"
342344
;;
343345
"write-uncor")
344346
opts+=" --namespace-id= -n --start-block= -s \
345-
--block-count= -c --dir-type= -T --dir-spec= -S"
347+
--block-count= -c --dir-type= -T --dir-spec= -S \
348+
--timeout= -t"
346349
;;
347350
"verify")
348351
opts+=" --namespace-id= -n --start-block= -s \
349352
--block-count= -c --limited-retry -l \
350353
--force-unit-access -f --prinfo= -p --ref-tag= -r \
351354
--app-tag= -a --app-tag-mask= -m \
352-
--storage-tag= -S --storage-tag-check -C"
355+
--storage-tag= -S --storage-tag-check -C --timeout= -t"
353356
;;
354357
"sanitize")
355358
opts+=" --no-dealloc -d --oipbp -i --owpass= -n \
@@ -374,7 +377,7 @@ nvme_list_opts () {
374377
opts+=$NO_OPTS
375378
;;
376379
"show-regs")
377-
opts+=" --output-format= -o --human-readable -H"
380+
opts+=" --output-format= -o --human-readable -H --timeout= -t"
378381
;;
379382
"discover")
380383
opts+=" --transport= -t -traddr= -a -trsvcid= -s \
@@ -427,15 +430,16 @@ nvme_list_opts () {
427430
"dir-receive")
428431
opts+=" --namespace-id= -n --data-len= -l --raw-binary -b \
429432
--dir-type= -D --dir-spec= -S --dir-oper= -O \
430-
--req-resource= -r --human-readable -H"
433+
--req-resource= -r --human-readable -H --timeout= -t"
431434
;;
432435
"dir-send")
433436
opts+=" --namespace-id= -n --data-len= -l --dir-type= -D \
434437
--target-dir= -T --dir-spec= -S --dir-oper= -O \
435-
--endir= -e --human-readable -H --raw-binary -b"
438+
--endir= -e --human-readable -H --raw-binary -b \
439+
--timeout= -t"
436440
;;
437441
"virt-mgmt")
438-
opts+=" --cntlid= -c --rt= -r --act= -a --nr= -n"
442+
opts+=" --cntlid= -c --rt= -r --act= -a --nr= -n --timeout= -t"
439443
;;
440444
"rpmb")
441445
opts+=" --cmd= -c --msgfile= -f --keyfile= -g \
@@ -459,13 +463,14 @@ nvme_list_opts () {
459463
--pmrcap --pmrsts --pmrebs --pmrswtp --intms --intmc \
460464
--cc --csts --nssr --aqa --asq --acq --bprsel --bpmbl \
461465
--cmbmsc --nssd --pmrctl --pmrmscl --pmrmscu \
462-
--output-format -o --verbose -v"
466+
--output-format -o --verbose -v --timeout= -t"
463467
;;
464468
"set-reg")
465469
opts+=" --offset, -O --value= -V --mmio32 -m --intms= --intmc= \
466470
--cc= --csts= --nssr= --aqa= --asq= --acq= --bprsel= \
467471
--bpmbl= --cmbmsc= --nssd= --pmrctl= --pmrmscl= \
468-
--pmrmscu= --output-format= -o --verbose= -v"
472+
--pmrmscu= --output-format= -o --verbose= -v \
473+
--timeout= -t"
469474
;;
470475
"version")
471476
opts+=$NO_OPTS

0 commit comments

Comments
 (0)