On Fri, 18 Nov 2022 09:01:58 +0800 Xiaoming Ni <nixiaom...@huawei.com> wrote:
> LOOP_CONFIGURE is added to Linux 5.8 ... > diff --git a/libbb/loop.c b/libbb/loop.c > index 9a7ca666d..d4f4906b0 100644 > --- a/libbb/loop.c > +++ b/libbb/loop.c > @@ -126,6 +126,30 @@ static int open_file(const char *file, unsigned flags, > int *mode) > return ffd; > } > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0) > +static int set_loop_configure(int ffd, int lfd, bb_loop_info *loopinfo) > +#else This assumes compile-time matches runtime. Ie, if you build on a 5.8 system, but run on an earlier kernel, the resulting busybox would be unable to mount loops at all. Please put it backward runtime compatibility, probably by having the new-kernel code in the same func. - Lauri _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox