logo

utils-std

Collection of commonly available Unix tools
commit: 3d77320c512fa26c6f372d4fd087912d8e61f4a8
parent cfee46ca8f51773fc9796a31c71e4a2ee0abadef
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  8 May 2024 22:59:57 +0200

cmd/df: Reset errno after handling statvfs error

Diffstat:

Mcmd/df.c1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/cmd/df.c b/cmd/df.c @@ -272,6 +272,7 @@ main(int argc, char *argv[]) if(statvfs(mntent->mnt_dir, &stats) != 0) { fprintf(stderr, "df: Warning: statvfs(\"%s\", _): %s\n", mntent->mnt_dir, strerror(errno)); + errno = 0; static_escape(mntent->mnt_fsname); static_escape(mntent->mnt_dir);