]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
util: replace ioctl use with function
authorKinga Tanska <kinga.tanska@intel.com>
Mon, 20 Jun 2022 16:10:39 +0000 (00:10 +0800)
committerJes Sorensen <jsorensen@fb.com>
Fri, 24 Jun 2022 17:56:27 +0000 (13:56 -0400)
Replace using of ioctl calling to get md array info with
special function prepared to it.

Signed-off-by: Kinga Tanska <kinga.tanska@intel.com>
Acked-by: Coly Li <colyli@suse.de>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
util.c

diff --git a/util.c b/util.c
index cc94f96ef1205e53f3a51d0bbe1c7eed840e92d7..38f0420e5bd565e2b2a2a34090c8a19068d67520 100644 (file)
--- a/util.c
+++ b/util.c
@@ -267,7 +267,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;