summaryrefslogtreecommitdiff
path: root/getfattr/getfattr.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2002-02-25 23:09:10 +0000
committerNathan Scott <nathans@sgi.com>2002-02-25 23:09:10 +0000
commit5f174a9fbe68d24975819fb67cb8e29e71c44bc8 (patch)
treedea2b40037fa117babd92c7fb3c1c11cb9e45e89 /getfattr/getfattr.c
parent44d2f93851030aea6d54ae4b561c3d3ca6783982 (diff)
downloadattr-5f174a9fbe68d24975819fb67cb8e29e71c44bc8.tar.gz
Merge of xfs-cmds-2.4.18:slinx:112563a by nathans.
workaround for Andreas' list kernel bug.
Diffstat (limited to 'getfattr/getfattr.c')
-rw-r--r--getfattr/getfattr.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c
index e84c7c4..bc098b0 100644
--- a/getfattr/getfattr.c
+++ b/getfattr/getfattr.c
@@ -305,12 +305,10 @@ int list_attributes(const char *path, int *header_printed)
length = do_listxattr(path, NULL, 0);
if (length < 0) {
- if (errno != ENOTSUP || errno != ENOSYS) {
- fprintf(stderr, "%s: %s: %s\n",
- progname, path, strerror_ea(errno));
- had_errors++;
- return 1;
- }
+ fprintf(stderr, "%s: %s: %s\n",
+ progname, path, strerror_ea(errno));
+ had_errors++;
+ return 1;
} else if (length == 0)
return 0;
@@ -325,6 +323,9 @@ int list_attributes(const char *path, int *header_printed)
}
for (l = list; l != list + length; l = strchr(l, '\0')+1) {
+ if (*l == '\0') /* not a name, kernel bug */
+ continue;
+
if (regexec(&name_regex, l, 0, NULL, 0) != 0)
continue;