]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix SC2086 note in zpool.d/smart
authorRyan Moeller <ryan@iXsystems.com>
Tue, 14 Apr 2020 20:18:23 +0000 (16:18 -0400)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2020 20:18:23 +0000 (13:18 -0700)
./cmd/zpool/zpool.d/smart:78:32:
note: Double quote to prevent globbing and word splitting. [SC2086]

Reported by latest shellcheck on FreeBSD.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10194

cmd/zpool/zpool.d/smart

index bd18e9d0443c385c26c51a8f27b909a0d4854bb0..874528d66ec215b626a1f9555f0e7914104460ff 100755 (executable)
@@ -75,7 +75,7 @@ if [ -b "$VDEV_UPATH" ] && [ -x "$smartctl_path" ] || [ -n "$samples" ] ; then
        if [ -n "$samples" ] ; then
                # cat a smartctl output text file instead of running smartctl
                # on a vdev (only used for developer testing).
-               file=$(get_filename_from_dir $samples)
+               file=$(get_filename_from_dir "$samples")
                echo "file=$file"
                raw_out=$(cat "$samples/$file")
        else