This can save hundreds of megabytes for a QEMU-operated virtual FAT32 disk.
function old new delta
mkfs_vfat_main 1766 1800 +34
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 34/0) Total: 34 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
"NO NAME " has special meaning _only_ in boot sector, not in rootdir's label.
function old new delta
mkfs_vfat_main 1621 1613 -8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
The "mkfs.vfar BLOCKDEV 1000000" case where BLOCKDEV is smaller.
function old new delta
.rodata 104938 104988 +50
get_volume_size_in_bytes 262 293 +31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 81/0) Total: 81 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This will allow detection of small FAT32 volumes which
are mountable by kernel - before this change we misdetected them,
and likely failed to fetch volume label.
While at it, avoid running off FAT if FAT is smaller than necessary
to cover entire data area, and rootdir has clusters beyond this
"shorter FAT". (This matches kernel behavior too)
function old new delta
volume_id_probe_vfat 856 886 +30
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
It's still enormous (16GByte FAT tables). Real-world maximum
is 16 times smaller since cluster numbers are 28-bit.
function old new delta
volume_id_probe_vfat 867 856 -11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Otherwise, we can read non-FAT area and try to interpret it as FAT.
function old new delta
volume_id_probe_vfat 851 867 +16
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
From util-linux:
This change enables the auto-detection of the internal storage on a VTech
Kidizoom camera, which has a zero head count value in the superblock.
Microsoft documentation, "FAT: General Overview of On-Disk Format", states
that the sectors and heads fields are only relevant for media that have
a geometry.
The Linux kernel also does not require a non-zero head count, and can
manually mount the filesystem.
function old new delta
volume_id_probe_vfat 841 829 -12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb now takes "" instead of NULL as format string for nomsg functions,
but this caller had not been updated making busybox segfault on tunctl
commands when ioctl fails.
This can be reproduced by running `tunctl -t tun0` in gdb and blocking
with the tun open after being created, and running `tunctl -d tun0` in
another shell: the later will fail with EBUSY after fixing:
> tunctl: Device or resource busy
function old new delta
tunctl_main 393 409 +16
Fixes: 4bd70463c7 ("libbb: pass "" rather than NULL as format string in _nomsg functions")
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Review of git log shows that they were mistakenly added during a rewrite
(confused with *FS type string* "swap" used in fstab to specify swap partitions).
util-linux's mount does not support this.
There is no reason to keep this incompatible extension.
function old new delta
mount_main 1250 1249 -1
mount_options 188 180 -8
mount_option_str 385 377 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-17) Total: -17 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
For DHCPv6, also require that all fields up until option array exist in the packet.
I did not find a definitive info that DHCPv6 requires at least one option
to be present, and the code appears to handle empty option array correctly.
function old new delta
d6_recv_raw_packet 228 230 +2
d4_recv_raw_packet 500 501 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 3/0) Total: 3 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
do_mktime() returned the result of mktime() as int. Since int is
32 bits wide even on LP64 systems, any time at or after
2038-01-19 03:14:08 UTC was truncated, even with a 64-bit time_t:
$ TZ=UTC busybox awk 'BEGIN { printf "%.0f\n", mktime("2038 01 19 03 14 08") }'
-2147483648
Return time_t instead and add a testcase.
function old new delta
exec_builtin 1130 1136 +6
do_mktime 119 121 +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 8/0) Total: 8 bytes
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>