From 80570a89f0736b8f0c8d5371f2331ddeba9b3bef Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 5 Jan 2025 11:44:11 +0100 Subject: [PATCH] df: treat ENOTCONN as a reason to skip a filesystem It seems this is returned for FUSE filesystems when they are dead. --- patches/src.freebsd.patch | 2 +- src.freebsd/coreutils/df/df.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/src.freebsd.patch b/patches/src.freebsd.patch index 19c46ed..17f3c23 100644 --- a/patches/src.freebsd.patch +++ b/patches/src.freebsd.patch @@ -3312,7 +3312,7 @@ + + /* get stat(vfs) fields and copy those over */ + if (statvfs(ent->mnt_dir, &svfsbuf) == -1 || stat(ent->mnt_dir, &stmnt) == -1) { -+ if ((errno == EACCES) || (errno == EPERM)) continue; ++ if ((errno == EACCES) || (errno == EPERM) || (errno == ENOTCONN)) continue; + xo_err(1, "statvfs"); + } + diff --git a/src.freebsd/coreutils/df/df.c b/src.freebsd/coreutils/df/df.c index 064fccd..51444bc 100644 --- a/src.freebsd/coreutils/df/df.c +++ b/src.freebsd/coreutils/df/df.c @@ -691,7 +691,7 @@ getmntinfo(struct mntinfo **mntbuf) /* get stat(vfs) fields and copy those over */ if (statvfs(ent->mnt_dir, &svfsbuf) == -1 || stat(ent->mnt_dir, &stmnt) == -1) { - if ((errno == EACCES) || (errno == EPERM)) continue; + if ((errno == EACCES) || (errno == EPERM) || (errno == ENOTCONN)) continue; xo_err(1, "statvfs"); }