2073b1
From ae6618a9573e7519f6e5c3ea02b7be865dd456d7 Mon Sep 17 00:00:00 2001
2073b1
From: Tomas Bzatek <tbzatek@redhat.com>
2073b1
Date: Mon, 17 Jan 2022 13:54:04 +0100
2073b1
Subject: [PATCH] rescan-scsi-bus: Do not use printf for summary
2073b1
2073b1
A string containing escape sequences can only be supplied
2073b1
to `printf` as the first argument. As there's no format involved
2073b1
in the summary string, just use `echo -e` to process the escaped
2073b1
sequences.
2073b1
2073b1
Fixes the following phenomenon:
2073b1
2073b1
1 new or changed device(s) found.
2073b1
\t[1:0:0:0]\n0 remapped or resized device(s) found.
2073b1
0 device(s) removed.
2073b1
---
2073b1
 scripts/rescan-scsi-bus.sh | 6 +++---
2073b1
 1 file changed, 3 insertions(+), 3 deletions(-)
2073b1
2073b1
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
2073b1
index 23eff3b..5d5d63b 100755
2073b1
--- a/scripts/rescan-scsi-bus.sh
2073b1
+++ b/scripts/rescan-scsi-bus.sh
2073b1
@@ -1384,15 +1384,15 @@ fi
2073b1
 
2073b1
 echo "$found new or changed device(s) found.          "
2073b1
 if [ ! -z "$FOUNDDEVS" ] ; then
2073b1
-  printf "%s" "$FOUNDDEVS"
2073b1
+  echo -e "$FOUNDDEVS"
2073b1
 fi
2073b1
 echo "$updated remapped or resized device(s) found."
2073b1
 if [ ! -z "$CHGDEVS" ] ; then
2073b1
-  printf "%s" "$CHGDEVS"
2073b1
+  echo -e "$CHGDEVS"
2073b1
 fi
2073b1
 echo "$rmvd device(s) removed.                 "
2073b1
 if [ ! -z "$RMVDDEVS" ] ; then
2073b1
-  printf "%s" "$RMVDDEVS"
2073b1
+  echo -e "$RMVDDEVS"
2073b1
 fi
2073b1
 
2073b1
 # Local Variables:
2073b1
-- 
2073b1
2.34.1
2073b1