Blame SOURCES/rescan-scsi-bus_printf.patch

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