Skip to contentSkip to conversation

nvme/rc: fix shellcheck warning SC2086

PATCH Applied Yi Zhang 2 participants 2 messages Apr 7, 2024 – Apr 8, 2024 Block layer

lore
Share & tools
lore

Yi Zhang

author
#0 lore raw

PATCH 2/2 nvme/rc: fix shellcheck warning SC2086

tests/nvme/rc:1056:7: note: Double quote to prevent globbing and word splitting. [SC2086] tests/nvme/rc:1057:7: note: Double quote to prevent globbing and word splitting. [SC2086]

Fixes 369d310 ("nvme: Add passthru error logging tests to nvme/039")
---
 tests/nvme/rc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/nvme/rc +2 -2
index 203cf0c..1f5ff44 100644
@@ -1053,8 +1053,8 @@ _nvme_passthru_logging_setup()
 
 _nvme_passthru_logging_cleanup()
 {
-	echo $ctrl_dev_passthru_logging > /sys/class/nvme/"$2"/passthru_err_log_enabled
-	echo $ns_dev_passthru_logging > /sys/class/nvme/"$2"/"$1"/passthru_err_log_enabled
+	echo "$ctrl_dev_passthru_logging" > /sys/class/nvme/"$2"/passthru_err_log_enabled
+	echo "$ns_dev_passthru_logging" > /sys/class/nvme/"$2"/"$1"/passthru_err_log_enabled
 }
 
 _nvme_err_inject_setup()
Signature · 1 line
2.34.3
#1 lore raw
Quoted 5 lines · Yi Zhang

tests/nvme/rc:1056:7: note: Double quote to prevent globbing and word splitting. [SC2086] tests/nvme/rc:1057:7: note: Double quote to prevent globbing and word splitting. [SC2086]

Fixes 369d310 ("nvme: Add passthru error logging tests to nvme/039")

Thanks, applied.

Of note is that the warnings are observed with ShellCheck version 0.8.0, but not observed with ShellCheck version 0.9.0 and 0.10.0. I added this note to the commit message.