> +config LOOP_CONFIGURE > + bool "always uses LOOP_CONFIGURE, kernel version >= 5.8" > + > +config NO_LOOP_CONFIGURE > + bool "never uses LOOP_CONFIGURE, kernel version < 5.8" > + > +config TRY_LOOP_CONFIGURE > + bool "try LOOP_CONFIGURE, kernel version is unknown"
The descriptions need improvement. > +static int set_loop_configure(int ffd, int lfd, const bb_loop_info *loopinfo) > +{ > + int rc; > + struct loop_config config; > + > + memset(&config, 0, sizeof(config)); > + config.fd = ffd; > + memcpy(&config.info, loopinfo, sizeof(config.info)); This copying of the struct can be eliminated, a-la: +#if ENABLE_TRY_LOOP_CONFIGURE || ENABLE_LOOP_CONFIGURE + struct loop_config lconfig; +# define loopinfo lconfig.info +#else bb_loop_info loopinfo; +#endif I reworked and applied it. Please try current git. _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox