logo

utils-std

Collection of commonly available Unix tools
commit: 42cee09fd958a8ea12cb40df494c923da2eccf45
parent e372efdd5c8e96be6b86b9e9e7be14813c11445b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  4 May 2024 19:37:13 +0200

cmd/df: Reset errno on stat failure

Diffstat:

Mcmd/df.c3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/cmd/df.c b/cmd/df.c @@ -224,7 +224,10 @@ main(int argc, char *argv[]) if(!opt_a || argc > 0) { if(stat(mntent->mnt_dir, &file_stats) != 0) + { fprintf(stderr, "df: Warning stat(\"%s\", _): %s\n", mntent->mnt_dir, strerror(errno)); + errno = 0; + } } if(argc > 0)