Re: Wishing rmdir had a prompt

2019-09-11 Thread Bernhard Voelker
On 9/11/19 10:29 AM, Lady Aleena wrote: I thank everyone who got involved with my little wish. I did not mean for it to explode like this. I am entirely comfortable letting the whole idea drop since there appears to be little to no support for it. I was just an idle wish that crossed my mind that

[PATCH 3/3] ls: add statx-enabled variants of stat and lstat calls

2019-09-11 Thread Jeff Layton
* add wrapper functions for stat, lstat and stat_for_mode so that we can conditionally plug in statx-enabled variants * add statx-enabled functions and set the request mask based on the output format and what values are needed --- src/ls.c | 73 +

[PATCH 1/3] stat: move struct statx to struct stat conversion routines to new header

2019-09-11 Thread Jeff Layton
* move statx_timestamp_to_timespec and statx_to_stat to a new header --- src/stat.c | 32 +-- src/statx.h | 54 + 2 files changed, 55 insertions(+), 31 deletions(-) create mode 100644 src/statx.h diff --git a/src/st

[PATCH 2/3] ls: use statx for loop detection if it's available

2019-09-11 Thread Jeff Layton
* move loop detection routine into separate function * add a statx-enabled variant that is used when it's available. No need for a full stat since all we care about is the dev/ino. * Since dev/ino should never change, set AT_STATX_DONT_SYNC unconditionally. --- src/ls.c | 106 +

[PATCH 0/3] ls: convert it to use statx() when available

2019-09-11 Thread Jeff Layton
This patchset converts the ls command to use statx instead of stat when available. This allows ls to indicate interest in only certain inode metadata. This is potentially a win on networked/clustered/distributed filesystems. In cases where we'd have to do a full, heavyweight stat() call we can now

Re: Wishing rmdir had a prompt

2019-09-11 Thread Lady Aleena
I thank everyone who got involved with my little wish. I did not mean for it to explode like this. I am entirely comfortable letting the whole idea drop since there appears to be little to no support for it. I was just an idle wish that crossed my mind that I wanted to share. Again, thank you