Re: [Toybox] [PATCH] df: -a should even show mounts we couldn't stat.

2021-02-14 Thread Yi-yo Chiang via Toybox
Hi Rob, I think the main purpose of the original patch is to show mounts whose stat()/statvfs() failed. For example, an under-privileged user may be able to read /proc/mounts but lack the permission to stat(vfs) the mount point, so showing "-" is a way of saying "I know this XXX device is being mo

Re: [Toybox] [PATCH] df: -a should even show mounts we couldn't stat.

2021-02-14 Thread Rob Landley
On 2/14/21 6:17 AM, Rob Landley wrote: > On 2/13/21 5:45 PM, Rob Landley wrote: > Part of what's confusing me here is you're still skipping device 0:0, which > is a > "should never happen" entry? (Even ramfs is only major 0 with minor > incrementing > per-mount I think?) > > Can we just change t

[Toybox] [PATCH] cpio: Implement -u (copy unconditionally)

2021-02-14 Thread Yi-Yo Chiang via Toybox
If -u is specified, then replace any existing files or directories. If -u is not specified and the path to be inflated already exist, then report EEXIST error. This behaves slightly different from GNU cpio, as GNU cpio checks the timestamp and replaces when the timestamp of the existing file is ol

[Toybox] [PATCH] cpio: Guard free() with CFG_TOYBOX_FREE

2021-02-14 Thread Yi-Yo Chiang via Toybox
--- toys/posix/cpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/posix/cpio.c b/toys/posix/cpio.c index 795f890c..e8205a30 100644 --- a/toys/posix/cpio.c +++ b/toys/posix/cpio.c @@ -304,7 +304,7 @@ void cpio_main(void) free(link); xclose(fd); } -

Re: [Toybox] [PATCH] df: -a should even show mounts we couldn't stat.

2021-02-14 Thread Rob Landley
On 2/13/21 5:45 PM, Rob Landley wrote: > On 2/12/21 7:37 PM, enh via Toybox wrote:>> Also switch to FLAG() and > capitalize POSIX. > > I'm tempted to break that part out and apply it just so I can see what the > rest > of the changes are more clearly. > > You want to print unstat-able devices w