Not related to your change, but I noticed we're using "statvfs.f_bsize" as
filesystem block size to calculate the used percentage. We should use
"statvfs.f_frsize" instead as that is the unit of "statvfs.f_blocks".
On Sat, Feb 13, 2021 at 9:37 AM enh via Toybox
wrote:
> In xgetmountlist(), keep
Just found out this block of text from fscrypt manual (
https://elixir.bootlin.com/linux/v5.11-rc7/source/Documentation/filesystems/fscrypt.rst#L1066
):
> The st_size of an encrypted symlink will not necessarily give the
> length of the symlink target as required by POSIX. It will actually
> g
attached is "just enough" tar --transform for the kernel use case. adding
the missing FLAGS syntax checking is easy, and
sed's unescape_delimited_string() is easily moved into lib for reuse for
fixing the PATTERN part of s/PATTERN/REPLACEMENT/FLAGS, but the REPLACEMENT
part seems hairy enough that
In xgetmountlist(), keep track of whether we could stat or not, so we
can distinguish an actual device 0:0 from a failed stat/statvfs.
Also switch to FLAG() and capitalize POSIX.
---
lib/lib.h | 1 +
lib/portability.c | 12 ---
toys/posix/df.c | 55 -
this doesn't work:
/tmp/toybox$ echo "a1234b" | grep -o [0-9]*
1234
/tmp/toybox$ echo "a1234b" | ./toybox grep -o [0-9]*
/tmp/toybox$
but this does:
/tmp/toybox$ ./toybox grep -o version /proc/version
version
version
as does:
/tmp/toybox$ echo "1234b" | ./toybox grep -o [0-9]*
1234
it seems w