From: Han Pingtian Date: Thu, 20 Dec 2012 03:31:50 +0000 (+0800) Subject: doesn't complain about "not a directory" X-Git-Tag: v22.21~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f496e5865e54101ad57a3930b4adbf56ff623ae0;p=psmisc doesn't complain about "not a directory" If /proc/#/fd points to a path which has component removed, fuser will complain like "Cannot stat file /proc/29322/fd/16: Not a directory". Looks like it can be disabled just like commit 898dc70a1f did. Signed-off-by: Craig Small --- diff --git a/src/fuser.c b/src/fuser.c index 0c773fe..e82d6e0 100644 --- a/src/fuser.c +++ b/src/fuser.c @@ -1411,7 +1411,7 @@ check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head, pid, dirname, direntry->d_name); if (timeout(stat, filepath, &st, 5) != 0) { - if (errno != ENOENT) { + if (errno != ENOENT && errno != ENOTDIR) { fprintf(stderr, _("Cannot stat file %s: %s\n"), filepath, strerror(errno)); }