On Fri, 18 Nov 2022 17:11:17 +0800
Xiaoming Ni wrote:
> >> +#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 2022/11/18 17:13, Kang-Che Sung wrote:
On Fri, Nov 18, 2022 at 9:04 AM Xiaoming Ni wrote:
LOOP_CONFIGURE is added to Linux 5.8
This allows userspace to completely setup a loop device with a single
ioctl, removing the in-between state where the device can be partially
configured - eg the
On Fri, Nov 18, 2022 at 9:04 AM Xiaoming Ni wrote:
>
> LOOP_CONFIGURE is added to Linux 5.8
>
> This allows userspace to completely setup a loop device with a single
> ioctl, removing the in-between state where the device can be partially
> configured - eg the loop device has a backing file
On 2022/11/18 14:34, Lauri Kasanen wrote:
On Fri, 18 Nov 2022 09:01:58 +0800
Xiaoming Ni 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
On Fri, 18 Nov 2022 09:01:58 +0800
Xiaoming Ni 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,
LOOP_CONFIGURE is added to Linux 5.8
This allows userspace to completely setup a loop device with a single
ioctl, removing the in-between state where the device can be partially
configured - eg the loop device has a backing file associated with it,
but is reading from the wrong offset.