busybox/util-linux
Steffen Trumtrar 6561e07460 mount: support the sizelimit and offset option for loop devices
Starting with linux kernel v5.4 squashfs has a more strict parameter
checking implemented. Unlike util-linux mount, busybox never supported
the sizelimit option but simply forwards it to the kernel.
Since v5.4 mounting will fail with

    squashfs: Unknown parameter 'sizelimit'

Support the sizelimit parameter by setting it in the LOOP_SET_STATUS64
structure before handing it to the kernel.

While at it also add support for the offset option, which currently will
always be set to 0.

function                                             old     new   delta
cut_out_ull_opt                                        -     167    +167
singlemount                                         1230    1266     +36
set_loop                                             834     862     +28
losetup_main                                         479     483      +4
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 235/0)             Total: 235 bytes

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2020-10-01 00:31:11 +02:00
..
volume_id Fix off by one error in FAT16 <=> FAT32 detection 2019-03-15 09:57:24 +01:00
acpid.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
blkdiscard.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
blkid.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
blockdev.c blockdev: add usage comment, no code changes 2019-06-08 08:57:11 +02:00
cal.c
chrt.c chrt: fix for SCHED_RESET_ON_FORK bit 2019-04-05 16:59:07 +02:00
Config.src
dmesg.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
eject.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
fallocate.c
fatattr.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
fbset.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
fdformat.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
fdisk_aix.c fdisk_aix: fix aliasing warning, comment out unused global variables 2019-10-04 17:16:15 +02:00
fdisk_gpt.c fdisk_aix: fix aliasing warning, comment out unused global variables 2019-10-04 17:16:15 +02:00
fdisk_osf.c fdisk: avoid overflow in "mega/gigabytes" calculation, code shrink 2019-10-04 16:45:04 +02:00
fdisk_sgi.c fdisk: avoid overflow in "mega/gigabytes" calculation, code shrink 2019-10-04 16:45:04 +02:00
fdisk_sun.c fdisk: avoid overflow in "mega/gigabytes" calculation, code shrink 2019-10-04 16:45:04 +02:00
fdisk.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
findfs.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
flock.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
freeramdisk.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
fsck_minix.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
fsfreeze.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
fstrim.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
getopt.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
hexdump_xxd.c
hexdump.c
hwclock.c hwclock: Fix settimeofday for glibc v2.31+ 2020-08-15 22:29:00 +02:00
ionice.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
ipcrm.c
ipcs.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
Kbuild.src
last_fancy.c
last.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
losetup.c mount: support the sizelimit and offset option for loop devices 2020-10-01 00:31:11 +02:00
lspci.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
lsusb.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mdev.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mesg.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
minix.h
mkfs_ext2_test.sh
mkfs_ext2.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mkfs_ext2.txt
mkfs_minix.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mkfs_reiser.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mkfs_vfat.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mkswap.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
more.c
mount.c mount: support the sizelimit and offset option for loop devices 2020-10-01 00:31:11 +02:00
mountpoint.c
nologin.c nologin: make it possible to build it as single applet 2020-06-24 15:05:22 +02:00
nsenter.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
pivot_root.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
rdate.c Remove stime() function calls 2019-11-19 13:08:25 +01:00
rdev.c
readprofile.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
renice.c
rev.c
rtcwake.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
script.c
scriptreplay.c
setarch.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
setpriv.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
setsid.c
swaponoff.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
switch_root.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
taskset.c taskset: tighten the check for stride values 2019-11-09 17:32:43 +01:00
uevent.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
umount.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
unshare.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
wall.c