dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/Query-Quiet-gcc-since-it-cannot-know-errno-0-in-this.patch

2c1b57
From 0dfff0f24355ad4b5c1776f7f19a404ffae25415 Mon Sep 17 00:00:00 2001
2c1b57
From: Jes Sorensen <jsorensen@fb.com>
2c1b57
Date: Fri, 21 Apr 2017 12:04:05 -0400
2c1b57
Subject: [RHEL7.5 PATCH 090/169] Query: Quiet gcc since it cannot know
2c1b57
 errno != 0 in this case
2c1b57
2c1b57
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
2c1b57
---
2c1b57
 Query.c | 3 +++
2c1b57
 1 file changed, 3 insertions(+)
2c1b57
2c1b57
diff --git a/Query.c b/Query.c
2c1b57
index 4dec9f5..2bd0e2a 100644
2c1b57
--- a/Query.c
2c1b57
+++ b/Query.c
2c1b57
@@ -68,6 +68,9 @@ int Query(char *dev)
2c1b57
 
2c1b57
 		if (md_get_array_info(fd, &array) < 0) {
2c1b57
 			ioctlerr = errno;
2c1b57
+			level = -1;
2c1b57
+			raid_disks = -1;
2c1b57
+			spare_disks = -1;
2c1b57
 		} else {
2c1b57
 			level = array.level;
2c1b57
 			raid_disks = array.raid_disks;
2c1b57
-- 
2c1b57
2.7.4
2c1b57