On 2/2/23 06:27, Mateusz Grzonka wrote: > Add kernel style comments and better error handling. > > Signed-off-by: Mateusz Grzonka <mateusz.grzonka@xxxxxxxxx> > --- > Create.c | 1 + > lib.c | 29 ----------------------------- > mdadm.h | 2 -- > mdopen.c | 12 ++++++------ > udev.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ > udev.h | 2 ++ > 6 files changed, 53 insertions(+), 37 deletions(-) This breaks miserably for me on Fedora 36: [jes@jes-t490 mdadm.git]$ make gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wimplicit-fallthrough=0 -O2 -DSendmail=\""/usr/sbin/sendmail -t"\" -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" -DMAP_DIR=\"/run/mdadm\" -DMAP_FILE=\"map\" -DMDMON_DIR=\"/run/mdadm\" -DFAILED_SLOTS_DIR=\"/run/mdadm/failed-slots\" -DNO_COROSYNC -DNO_DLM -DVERSION=\"4.2-94-g47c22f0\" -DVERS_DATE="\"2023-03-02\"" -DUSE_PTHREADS -pthread -Wl,-z,now -o mdmon mdmon.o monitor.o managemon.o uuid.o util.o maps.o mdstat.o sysfs.o config.o mapfile.o mdopen.o policy.o lib.o Kill.o sg_io.o dlink.o ReadMe.o super-intel.o super-mbr.o super-gpt.o super-ddf.o sha1.o crc32.o msg.o bitmap.o xmalloc.o platform-intel.o probe_roms.o crc32c.o -ldl -ludev /usr/bin/ld: mdopen.o: in function `find_free_devnm': mdopen.c:(.text+0x5f5): undefined reference to `udev_is_available' /usr/bin/ld: mdopen.o: in function `create_mddev': mdopen.c:(.text+0x6e6): undefined reference to `udev_is_available' /usr/bin/ld: mdopen.c:(.text+0x8db): undefined reference to `udev_block' /usr/bin/ld: mdopen.c:(.text+0x96f): undefined reference to `udev_is_available' /usr/bin/ld: mdopen.c:(.text+0xa84): undefined reference to `udev_block' /usr/bin/ld: mdopen.c:(.text+0xef5): undefined reference to `udev_block' /usr/bin/ld: mdopen.c:(.text+0x1106): undefined reference to `udev_unblock' /usr/bin/ld: mdopen.c:(.text+0x11ce): undefined reference to `udev_unblock' collect2: error: ld returned 1 exit status make: *** [Makefile:220: mdmon] Error 1 Jes