From: John David Anglin Date: Mon, 4 Aug 2008 12:04:44 +0000 (+0200) Subject: ls: ignore spurious getfilecon failure due to lack of SELinux support X-Git-Tag: v7.0~103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8c3835bf931b766a9a44368520ea670229e540ed;p=thirdparty%2Fcoreutils.git ls: ignore spurious getfilecon failure due to lack of SELinux support * src/ls.c (gobble_file): Upon failed getfilecon, treat an errno value of EOPNOTSUPP just like ENOTSUP. See . --- diff --git a/src/ls.c b/src/ls.c index fd32730e4e..9261f62196 100644 --- a/src/ls.c +++ b/src/ls.c @@ -2715,7 +2715,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, ls fail just because the file (even a command line argument) isn't on the right type of file system. I.e., a getfilecon failure isn't in the same class as a stat failure. */ - if (errno == ENOTSUP || errno == ENODATA) + if (errno == ENOTSUP || errno == EOPNOTSUPP || errno == ENODATA) err = 0; }