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 config: update size information 2018-12-28 03:20:17 +01:00
chrt.c chrt: fix for SCHED_RESET_ON_FORK bit 2019-04-05 16:59:07 +02:00
Config.src restore documentation on the build config language 2018-06-06 15:16:48 +02:00
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 config: update size information 2018-12-28 03:20:17 +01:00
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 getopt32: remove opt_complementary 2017-08-08 21:55:02 +02:00
hexdump.c config: update size information 2018-12-28 03:20:17 +01:00
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 config: update size information 2018-12-28 03:20:17 +01:00
ipcs.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
Kbuild.src Convert all util-linux/* applets to "new style" applet definitions 2016-11-23 11:46:32 +01:00
last_fancy.c Sort some miscutils/ applets into coreutils or util-linux 2017-04-12 13:58:40 +02:00
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 more bionic fixes 2016-03-14 19:34:15 +01:00
mkfs_ext2_test.sh fix more instances of ": $((a++))" in shell scripts 2017-07-15 19:20:45 +02:00
mkfs_ext2.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mkfs_ext2.txt mkfs_ext2: use compatible inode sizes; add -I <inodesize>. (by Vladimir) 2009-10-22 12:12:17 +02:00
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 config: update size information 2018-12-28 03:20:17 +01:00
mount.c mount: support the sizelimit and offset option for loop devices 2020-10-01 00:31:11 +02:00
mountpoint.c config: update size information 2018-12-28 03:20:17 +01:00
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 config: update size information 2018-12-28 03:20:17 +01:00
readprofile.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
renice.c config: update size information 2018-12-28 03:20:17 +01:00
rev.c config: update size information 2018-12-28 03:20:17 +01:00
rtcwake.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
script.c config: update size information 2018-12-28 03:20:17 +01:00
scriptreplay.c config: update size information 2018-12-28 03:20:17 +01:00
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 config: update size information 2018-12-28 03:20:17 +01:00
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 config: update size information 2018-12-28 03:20:17 +01:00