]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdadm: use standard libc nftw
authorXiao Ni <xni@redhat.com>
Wed, 7 May 2025 10:06:59 +0000 (18:06 +0800)
committerXiaoNi87 <xni@redhat.com>
Thu, 8 May 2025 15:30:38 +0000 (23:30 +0800)
commite549ac6ab2ce5e7ec182310f8f5f2e41c6ac9233
tree78aa674d206a8451c9c77818b13143a2a255d9b0
parente270c8f99e90cf89e0c1a0534547e7b4bf285041
mdadm: use standard libc nftw

commit bd648e3bec3d ("mdadm: Remove klibc and uclibc support") removes
macro HAVE_NFTW/HAVE_FTW and uses libc header ftw.h. But it leaves the
codes in lib.c which let mdadm command call nftw defined in lib.c. It
needs to remove these codes.

The bug can be reproduced by:
mdadm -CR /dev/md0 --level raid5 --metadata=1.1 --chunk=32 --raid-disks 3
--size 10000 /dev/loop1 /dev/loop2 /dev/loop3
mdadm /dev/md0 --grow --chunk=64
mdadm: /dev/md0: cannot open component -unknown-

Fixes: bd648e3bec3d ("mdadm: Remove klibc and uclibc support")
Signed-off-by: Xiao Ni <xni@redhat.com>
lib.c