Skip to contentSkip to conversation

util: replace ioctl use with function

PATCH In review Kinga Tanska 2 participants 2 messages Apr 4, 2022 – Apr 6, 2022 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 util: replace ioctl use with function

Replace using of ioctl calling to get md array info with special function prepared to it.

---
 util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
util.c +1 -1
index cdf1da24..003b2f86 100644
@@ -268,7 +268,7 @@ int md_array_active(int fd)
 		 * GET_ARRAY_INFO doesn't provide access to the proper state
 		 * information, so fallback to a basic check for raid_disks != 0
 		 */
-		ret = ioctl(fd, GET_ARRAY_INFO, &array);
+		ret = md_get_array_info(fd, &array);
 	}
 
 	return !ret;
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Kinga Tanska

Replace using of ioctl calling to get md array info with special function prepared to it.

Thanks.

Coly Li

Quoted 17 lines
---
  util.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
util.c +1 -1
index cdf1da24..003b2f86 100644
@@ -268,7 +268,7 @@ int md_array_active(int fd)
  		 * GET_ARRAY_INFO doesn't provide access to the proper state
  		 * information, so fallback to a basic check for raid_disks != 0
  		 */
-		ret = ioctl(fd, GET_ARRAY_INFO, &array);
+		ret = md_get_array_info(fd, &array);
  	}
 
  	return !ret;