Blame SOURCES/0018-Suppress-non-blocking-dmraid-error-info-1198918.patch

2e96e6
From d7958293328ba96b5cc7f743b4dd4644a35cb16b Mon Sep 17 00:00:00 2001
2e96e6
From: Robert Marshall <rmarshall@redhat.com>
2e96e6
Date: Thu, 31 Mar 2016 13:54:18 -0400
2e96e6
Subject: [PATCH 18/18] Suppress non-blocking dmraid error info (#1198918)
2e96e6
2e96e6
Calls to dmraid did not uniformly redirect standard error. Disks with
2e96e6
unsupported sector sizes are safely ignored and not added to the list of
2e96e6
disks even though an error message is sent to stderr.
2e96e6
2e96e6
Redirected stderr output for invocations of dmraid to /dev/null. This is
2e96e6
safe because actual failures would return a non-zero exit code and
2e96e6
os-prober already guards against those failures.
2e96e6
2e96e6
Resolves: rhbz#1198918
2e96e6
---
2e96e6
 os-prober | 4 ++--
2e96e6
 1 file changed, 2 insertions(+), 2 deletions(-)
2e96e6
2e96e6
diff --git a/os-prober b/os-prober
2e96e6
index 4b371d6..ccfdf13 100755
2e96e6
--- a/os-prober
2e96e6
+++ b/os-prober
2e96e6
@@ -25,7 +25,7 @@ on_sataraid () {
2e96e6
 	type dmraid >/dev/null 2>&1 || return 1
2e96e6
 	local parent="${1%/*}"
2e96e6
 	local device="/dev/${parent##*/}"
2e96e6
-	if dmraid -r -c | grep -q "$device"; then
2e96e6
+	if dmraid -r -c 2>/dev/null | grep -q "$device"; then
2e96e6
 		return 0
2e96e6
 	fi
2e96e6
 	return 1
2e96e6
@@ -49,7 +49,7 @@ partitions () {
2e96e6
 		# Add Serial ATA RAID devices
2e96e6
 		if type dmraid >/dev/null 2>&1 && \
2e96e6
 		   dmraid -s -c >/dev/null 2>&1; then
2e96e6
-			for raidset in $(dmraid -sa -c); do
2e96e6
+			for raidset in $(dmraid -sa -c 2>/dev/null ); do
2e96e6
 				for part in /dev/mapper/"$raidset"*[0-9]; do
2e96e6
 					echo "$part"
2e96e6
 				done
2e96e6
-- 
2e96e6
2.5.5
2e96e6