From a94a551ee031e0ff07d707f867cb08a8be83e78c Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Thu, 3 Oct 2024 15:15:48 +0100 Subject: [PATCH] ls: fix spurious output with -Z * src/ls.c (gobble_file): Only output an error if there actually was an error. --- src/ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ls.c b/src/ls.c index 101ffa818..290ce35d2 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3518,7 +3518,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 (print_scontext + if (print_scontext && ai.scontext_err && (! (is_ENOTSUP (ai.scontext_err) || ai.scontext_err == ENODATA))) error (0, ai.scontext_err, "%s", quotef (full_name)); -- 2.11.4.GIT